{"_id":"ipfs-http-client","_rev":"399-171a7e5e11669f732d4e6266da2789e9","name":"ipfs-http-client","dist-tags":{"latest":"60.0.1","next":"60.0.0-7b79c1b8"},"versions":{"27.0.0":{"name":"ipfs-http-client","version":"27.0.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^4.1.3","multiaddr":"^5.0.2","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.14.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^2.0.3"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.88.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"540ec5fab10af35dbd2157a21535b98845553222","_id":"ipfs-http-client@27.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-nI12XVXeMm4LU48usmwEgOiw2+byFXppju/U3TFG8u51W5bBP3FslY08t7lKqexPbSFz1+rhYLswJkxV9aQixg==","shasum":"1b0594d5e98f8f2bd0873a9c4cfa917d57380594","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-27.0.0.tgz","fileCount":223,"unpackedSize":12039357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/oQmCRA9TVsSAnZWagAAQNwP/iVUSd+L01ujfTNaY2HL\nCvMTIpy7+zeDREFUneDqKG1bLWw3SXFUpGCzLXJ295H66LPAqHGB8lBpDFlR\n936cd2ESDdp5K6Iem4ZjWlLZaLSDdBfKG/gJ9GkpyU3hv5yoSVcZ6R8pCWcS\nfeotWMPbyhw1pSJBKDwf6pQFgiooPXvyFAv8s5Jqdzm2LXm4igjA+e3Reh2U\nuwqTrWo/Kz/CYuhacWiiytwW6Eu+LGpqS5YUMPLXI9p+7w5wGEKD2rUT3QwX\n47SBlNrpLwQMm0lSqa4UHdxBG4kxMkU5Y6NVWUFRcitoV5IFf3/rc73cUPL1\nHzOY3lNu4jo/dpFZ5CDuqJozwPTyocu5LID975hnpWT4gA2vw86DJTJuIPRz\n8Ca6GpiDEzfReXz9ib9Vr8M1Yff6dJCSpX0p6Byn1UpclDd/B6Vh3fDthymo\nUVB/XNl1UG45IvR+UqkqTBlLbCJ0JDlhulcPpX0F7U76vBd5vZwKNl/14QrW\nM4N4X/DL9kz6PO5ewg1SV/SjCysyZujplLq+X1tObd3+jDw/1NT3gTZwe9W4\nUnd47h2Oh53ocbZMnJqigtDW4Z5XZKye/xcgVOvp/5ctnqlM7ViU8B2kdJlC\nUwdnIX9mCsQjchmSUb1UTF0RciggBCdqEUEi+MvkaRAkIcHMqBQdOiODIrk8\nMyT9\r\n=OCo7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVmUHY7XjenPoPBhskQLwIbAffMfPg5h6Y3k38f3CDIAiEA3ib/StETPrzwKTBcUKtWgzwAsvn+ejAjoMjumxHGC+8="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_27.0.0_1543406629524_0.8475207747294864"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"27.1.0":{"name":"ipfs-http-client","version":"27.1.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^4.1.3","multiaddr":"^5.0.2","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.14.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^2.0.3"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.90.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"095986636b8f164b305acb6a52ac903b1ff64ceb","_id":"ipfs-http-client@27.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"dist":{"integrity":"sha512-Id9C0V8Bxnr8xBjXdVf7qUBAnslkvgHSFJw+csx4t5dqqeaI/aOLnNZG/6RBgmvI0//3ixKgwzgSt2vBHxeikw==","shasum":"5db19d2d63210098e9651e9909275ddd9dd19289","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-27.1.0.tgz","fileCount":225,"unpackedSize":12047561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcB+JyCRA9TVsSAnZWagAATCoQAINOPDqDDTmv3ekhSQ6E\nmdm4ywqFT6gnI5Eh/tHAqkJkMHxwK+ss9oVuXBP0KpaB+fWmOvDgP8mvapfY\nT62kOVGtMKQXV5j5WF33saFbbG9QkpVfiEgsUUvhWjDnVsHn6r6QnXjBkTzx\nd60e/5grQCp67YMfSTjJhjFmBN/6hcTQKwzVtk9VmtZQYyRf24gbufTKmf0V\nTwDJ57zQH9HjzvE6VXTPeeCbJq0Kf31gH25nQ3NiXwMF48dihQea05b/e6Mg\n2W1cCGPQkmFJhx/Z7UdlobxSRq8IUYSDSvOL39nAjQcRmJ7AHPvqAYL/eSsV\nhW/AcDRHkh4XDIVQOy2BbIzAnNRHYXVBvqra3whkoVKlTuV7AOKf0Ky93foZ\nyQtw8PH9OtZlPEF1TmD+AzYzSw/jzV6iFot4QY9Q/pTky9VHUTe40w9OvULv\nYsOxJNDVRo07onPkvaJmQZQGd8jkRmyvxvazHN8mdtu1C9L104f21Z/yawGM\nAYoH86GcUOlr4rG3vEvChEoXYJK+tikOP37cPTB42ehuNU6rzcnS3VBaV9+r\n7GCnBspV3wsQNKylNrqTMp8Mj2NRaYsreanj9PjUvDDFNuejspBbybQjFWgy\nc8+uvMB91jBHqGFTaSXHzyByWNy8v5lPEKevG7gK+c3GauIvpocSSaM6Iogf\nwUEP\r\n=1Dwe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHpSsmxBRHc1Z+ETjXWmZ6On6nei9YGVWMMG9DOR+WXrAiEAsd5IeNfccIXG/Xn5UKxoAlDA1SfXMhRnRC1eWU5IWP0="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_27.1.0_1544020593333_0.38002474043240886"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.0.0":{"name":"ipfs-http-client","version":"28.0.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.91.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"72955db94ea4251e621e5a0679efbbfb2ee3c56a","_id":"ipfs-http-client@28.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-Z+aQsP46DuwhvjG2qjtnEnb4at48Eif213d0I7j8+uADo7EALwsNk1lPJeY6wsnlKla/X+BKcQvz01+EtHmJnQ==","shasum":"833426b319e4f52d1c40c6eb02235537cd05e4ed","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.0.0.tgz","fileCount":226,"unpackedSize":12109361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD321CRA9TVsSAnZWagAAP6cP/ivMB1jcx1iawAzI126H\n0V7P/Nf87xQ7b1DzYEjc/YG6zlqlFrupo79+eJKA+3s3B+2rpmu9r2Pz6mhq\nkUS3rFHsT6A5AbAbQCGdCJWaXa4Y2fUcOBpW8oM4JsxoNjfXpaLbmFktgQCL\nwuETVslO1XHBWZeAw37e0Dpai9pVBEiVGy8NboUPOt9NP7dOAWEPi104IT/S\nbUv6ErFn8T9VDcoslGKd6D1Pl3JN9LdB9Hq4F+qDeKTqn8ksWoHTPh60WpAD\nYRmbqlm2ficapQIE+arN+8edWj2pp1+XnWctS2rwRQkgcu2k2Yl7QapJfawC\nvZCERu/bxy5bIe4vf2xlH+02qCFOdu5S0jarbd6XB28HB/ntsLRPYgy1OXrW\nUXGRJ0oI99NoPcCTEsP0RyaEBvtm497rMiELQrlmtXml8izPzZj4suNbpvTM\ns10u+4hRdAQTd4BtnRR4LhvfqikpmauES6xA1JKkU+V1LYqBLQrFiNpCBu2s\nbRx6Q03YFnn697DW+DJB2menBbUSg7HFbUUjvZLeY8myxTB79mm2awXdiZWV\nrMwMieTsp/6UZXFx89HhjTUmTavR1JaBPkKostAjGDZrN2sj43DbS5W4F/jv\nslbYTQrBlKC9KvCAG/tJI1jzEGUzx6D7jMbgvK2C7j9yPywfo8/z3Z4jJbt8\n61a8\r\n=A6bp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID4sB7+haiPE9Qh9wOqNuwVNlTDQ9gymV/BSrqHEVdoWAiBT/ArfVKHF0P5ycXesY76ZmrcXSUBU/2Y1VwoOl7pWdA=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.0.0_1544519092690_0.28361567384805064"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.0.1":{"name":"ipfs-http-client","version":"28.0.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.92.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"008e353992683772c8f7fbf022c84342529dd029","_id":"ipfs-http-client@28.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"dist":{"integrity":"sha512-Ozve2AocW3sUKA3QO2gcmnUss5WZVol/wmcEwEm54Qm1XmlK9PVb+gMVguDcFaeduOIx/P/hTAq/CQIiul7gZw==","shasum":"4d7cab91a27b42b296242de777b8a77bd4ce4caa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.0.1.tgz","fileCount":226,"unpackedSize":12111674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEm9FCRA9TVsSAnZWagAA/AoQAI33zg51apjESMh0OwyY\neSoSwA/WP2wV0fP+d5MulJfKJs79jYa+hrCORobvD5ay9JrRFtcd8iBzRkGD\nHDUYiHGnVYPL3E5E0/HZHy22/Fi8cdbyCUrTDEmv1zedG1oFWqEyX/liKw/l\n+n2L59yVTH2g2nVR1vMdc3Q2+boLEx9e1hc4BQkst1mcu2xBy0JsMskjGPds\nyrf8ySz78voAuj0EIjXj2EF5UzOVoiqnjRG5gkCIZEUVlKeAyldCdM/q0PWP\nBz9HVHWdrTLU/YKQ3yZ/mgr/HXmQxcOD9c4YCc+nkQSEEP4MWHb2mvyrtGtW\neyg4h2BlNcGQrUqayb20tL7k62b6IVRqutVgNrUE/DKfuKYzs6KmqmJNY1oB\nw1yewSwYYR5tS9gzC+gFZz0437xd3RutlL3zcBP3wtrmNndwPVPTgsy5PYK4\n6Zdy/XuR1VX8YwDEVQDVBGiiS+vd2WZhABdjwVpud2phL8pPBMrceKCEJWXf\nw5//1UQ8tnhvtGZ48RDgjIXy/Icj3B9CrhSbc9FND3AcxieHicAsB7AIVPjJ\nPbozEdweGhm8hF+cO8t+fsh9A4YLW2hcLkUQpOB7hh6wHeon5uIqIRyEKr/8\nngyg8QoNiTPs6/uOk+kes2Qa0SIxSokfRcR0eDdE/47p/rk1YrygdRt0Xr78\nIb4Z\r\n=6EWm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5fqblCozmccJB6iYqLsEuhUoEUnH5G2RPy6tm5/fzvwIhALynIHxUb7RDBnvVGdD60vSvyBqCK0+r5zQaF5+LBFFt"}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.0.1_1544712004235_0.3685347092785247"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.0.2":{"name":"ipfs-http-client","version":"28.0.2","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.92.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"fdaf77618b27c2456e4a414781bf8b676cf9465b","_id":"ipfs-http-client@28.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"dist":{"integrity":"sha512-AVZcyCg3akR34MACtPMq1/sBLaDLaXsdoQHaBql/PpKF6VpYKjtAdP9qn0tj2Nix3VD36yOS5JHPrI/kusKIGw==","shasum":"019a4cfcaaecf567338864a2d4f1b5d19874ef16","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.0.2.tgz","fileCount":226,"unpackedSize":12111807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcE9UuCRA9TVsSAnZWagAARIUP/2NcfnUyAsvOP+lUu5DP\ncoyJ605MR6aIx5ystgRnKWfNFLtpmKhN4VwYHKWd0pfhjqzb7tbokE/On66W\nrxu6lgPEf9TvOhaMennKLcI9q/kd5NrpBIXTrhK8MCgwBLF7TRANpS5fVfW7\nVNu6NZv7twpBMGd7zGJcwwO2oC+k9Spl13xxaqvJmAL4N1h6Uq+rI9zrJJWT\ns3bDFlvdBI4CEuEknmftzchhhJX6MarAe0hORC1zcW8N+nAmrg6DKYYAuGm5\nKYhuordPgaGnvAaykWxu3v4TRTCLKfV2uoWDzgn1aPDftSiiB9mMZekpWzch\n1SCncdudvGQT76N7UciIZPhCKu7fXqdC/lrprqvgHe7+ybak2jQ4R3Bvmwf+\ngY1bT3oQyaLIlxpmVNJComa0v8SaoGSKKuSna0NedlLUgzryTdKpOjjiZn2S\nfdE+WXz3QZtsAep2A1gZI7mJVk6ghBgRaGMfncBLD6UFso7AoW0ROUU26Ipe\n6s+CP9L0I9usoONnHNiFAT8nKHkav69xWyc429g+eyRKegd2WTlAEBLr70+D\nwMLoKrUGSoPaoYTwmX4Vq5cWFuocSevOTEL2yh1jGsqyo2huWzOifap3SK71\nef5yP/o47QK+iCxG7pcXnInXWixUGX32POylIbQkASVR7HgIKIGpq7lKvVwA\nelq6\r\n=wXrh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD590oSb7bBsQyeXLGAzI0wWWrMAO58BVRv3FQYBnbauQIhAIH7jPgsWhAdxKnMjBQeaBS1V+KvW5FsCOmRLVOhLFzq"}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.0.2_1544803629220_0.9205151524255155"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.0.3":{"name":"ipfs-http-client","version":"28.0.3","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.93.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"d46fcc99d87b9656b19e3c407b254636fe6f830d","_id":"ipfs-http-client@28.0.3","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"dist":{"integrity":"sha512-ni0uOjN17Cmm2RZmO5foKGdfM3BCzR3Die6zTtWhuSQpkGezZ8K7djxPWYk5qLuVYTeg49y29nA4SP8wbH4A9w==","shasum":"0718b2a52e1526622f8d7a4d0f0b0fa9ca194c5d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.0.3.tgz","fileCount":226,"unpackedSize":12113474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFVc2CRA9TVsSAnZWagAAzkIP/RNMS7Yr/a7QWmJbaogz\nds84B+sXERMyjArW4gwXySxgce7t/oHeRUAVGbICDogPg863qr/pwmsf2z5Y\nXK9JY3996ENnsSzUeTwNI2PJjErh2g6rwFyryIhKGhs9B8dmp2NBs/0yRbtz\nxvHrdMByRK9M4mqYyyN9lICCqQ9uafuk6j3E+FGKoZXoyS2/YXYD6ulIcK/y\n38YKCi+AbymzNGHSIIvoaPDTisxdD1dIDHjU2WAJNRGenqKNJ6WVLfCjVmhA\nJO+61R0PNW30yssnkQp/ADcXf19z0GJaUJ+qvQIqi+WViNFd4qjehIZuQBLu\nIBogbH4ooBUZTF8PB518Q7Ce+qkPJy/KmN8hy8eU7+FbE6vzYqQzAfZzX/Vz\nNllaahnlYbMd0c4BQbGwewOjAvWrD9GMwi4UU6/CrtzbF5mE3gY3d4R7ICcj\nLs27qrfYYWAVTwOPfHN1arymQRc/E7YrEr4fMRPGa60kFCSZMBvldbclaiMe\nZO6Nxjb/Flj/zwkm+6t0C4DuCqkA5lKWYJPTlyFbA5aoPovCJSN72N64hNEi\ncvIUM9bmkC3bzrA7EvSrb/0rRH9mo8nOb+Ft8Pai5SaRunrlmdikOljHeZ2T\nOXBZsOdI/esufRFGY4uDatplc13Jee8/3zueW81fxU/hdNu8LJdniLmsx7JI\neK7Z\r\n=5s15\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAYtl3aLflcB1tP6fgX96X7YmuSHl+w2xpSm9ZDV9GfMAiBq3P5S08D02kltc4vHaApukxdUQWCrW9l8hYQhDHWnCQ=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.0.3_1544902453529_0.5515432352345331"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.1.0":{"name":"ipfs-http-client","version":"28.1.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^1.6.2","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.14.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.0","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^17.1.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","gulp":"^3.9.1","interface-ipfs-core":"~0.94.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"587c787de8ec60efc1a812e74e44549d3ed33a75","_id":"ipfs-http-client@28.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-fdZvP2ylGVW3+0P0LiqqwP5qaVOyKADvHmoY/c8A1fYZHpIy2W3qrAVSzXhgctJsJMr2AQdGeDIYq8i9eozKrA==","shasum":"5f9bb7482417d6da8f6cb34d5b363602cd905be8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.1.0.tgz","fileCount":226,"unpackedSize":12127558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFtIWCRA9TVsSAnZWagAAltwP/07ebVcKNPeXR76KFh1o\nM0bki4JwNtXNdwimroN3E87nBSp4O48GyM2+ImtNm0vgrhPbtQUMJsRWz1Gx\nWS+PsoWoz7oMs4wJ5JVK4W8on/IkTYtmUecteLyDxDGZOJzXtC6WEuG/4bST\ntNjqLzmLQ7Wi0apN2AVK1Wb7BHY06kfYU5EiYunAl5cvivfwlcEJfYYpj017\n6Rrlfy1IGRvE/Pz+Fywcr3cnwxn701ncbTBW7XsVoGvxx8RdaR9AMvqFHV+G\nCDf6xTxVDqASfJiMGuRTkZsLaVYes4YDR8tOrDkvBc1fq+dU9ZqPki8rP8R1\niBjGHLq/Tj5ULqjGOt7qaWKgeFfbXMtl8nBaWBAR7F5uoksq1h1fYPtp97WZ\nH0hSGfP6gF1aTUQvsrBbcH7S/6Uki2VNjs8nt7jxui5AudcHYDAsNWFjni42\nD7hk3ckxUJMaUu83wRDjTC9KTUKeHlphhAMwCYZwJER4IRQ/5tjMD5wY+96k\nfQKc1NZyIsCEXCI84aoK1y9qLFMhDepHyK6we+/Oz8ON0yK9g7gq3dpK0dx0\nF/71zmqrb/gCnsuRZ8fxvvH0Grwf4Ljc4XEeXCSTeRKq0Hg0uQrcEo0Phjia\n/ZVT3/9u1BdeXEGzQvsdIev6u2GrxJGQad9P+B4IDgz5RXEkisarQ/mUFBJw\nyLGj\r\n=bFnI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMcRwwHcAbbsSKw47F74JkGAAsDABWtfCdj0bkgWjfVAiEAnvkLh3GtoviziTSF6RyHZzPzD+kKF5vL7uVOUlDb7Xg="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.1.0_1544999445608_0.46475491813622605"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.1.1":{"name":"ipfs-http-client","version":"28.1.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.15.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.94.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"3108a34808dbae3edf92cf0072a95cf6d3eef59f","_id":"ipfs-http-client@28.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-ALADh30CBwHFi076KPzHRZdnuYeF02SX4YcuFbVDX+nj6h0FGBXpf9w4KGrygQrPH/uKscJESV65crbAShIRUw==","shasum":"618f21907250c0dd6e4d6f065db96afe353b1332","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.1.1.tgz","fileCount":226,"unpackedSize":15508530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcL0jJCRA9TVsSAnZWagAAwTMP/3o9sv3AjSHnzu8EirSA\na4/FpP/jKnYhf5l/dsWfnfGM7YaTptXUg+edeGl2TFS68ar0lRnxHvi3tz7U\nCw5X5TRVQNRGJC9qjAe3reodEiUgN5LEeLClTBW1oWlvRwX2vynaphtuQVgx\nV6cINXfFoTnWnQF8yjUH8XJX/s8C/jP54iYB4o7CjOGyTyTqWOe5raA+esH6\nAU7ILByX/awJwNlCD5DBoZbbRLA/ToNouumdy8NR4SHc6m9V0DO7AA/kFH+Q\nWFvBrvrLdYg+UFfPds+p/qRIzOQfmKswdJA5EluYCKfcfXjxtQhLzNXBtnRl\nq7SEPIU9jRiDLjJJfRQ5el6aS5nkDDAxRpjoHwLawBuMR6uSBapqkcHz9AU1\nyQt8i0Kb/w3Yzkxcpvxvxh6zdNTZrG6hY0eojDDlr66IMnQVx+dAO1OC7b7v\nkTqtaBk5bv/nHXxCLdSoLwP7LvLZU4ymD5uXSvDuT2CA/KIpMJqd99HQNsbD\nivPeswBAdJlJKSNOqrecNjuAbk+0uQDr7zYmCSIR4iSJwksD9s/3leG5PJGb\nzZvNyWnUVwsd3xB/12NRNi+e8nSPxd3Svmywa+bWluN9VTqq3UoC/LCZSFpr\nuyLwrRkSiwsHwDEx529/CKUfYxiRC+bgQQCvwJOlR16u8UKfmHIUQfrCubwN\nrpw8\r\n=3mKz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAfBn8ICL09UqpWMdYEwtcQg1yW6/1zhEnl08BcfHqAoAiEAp+adgMkiqa5/X4BPRBfKFrayt3nAEnsmImV4bMiTf7Y="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.1.1_1546602696919_0.6349056243727791"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"28.1.2":{"name":"ipfs-http-client","version":"28.1.2","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","big.js":"^5.2.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"39e4d7c4c464a546352bfbdcf3ef2289dc855cbf","_id":"ipfs-http-client@28.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"dist":{"integrity":"sha512-NThmLsBBRAboV8Sgs87U0QV4XUrIR58pdiGJ2v4VFHFmJEIPNQInFVw0x3btnElKnOd3FphE72+8918PcskVbQ==","shasum":"7e03fc175039a2d841299366bf23d7141df8bc43","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-28.1.2.tgz","fileCount":226,"unpackedSize":12090545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPK9vCRA9TVsSAnZWagAAxB0P/20q/yk39PafD4/+qP/s\ntAtJnA7c97mT5JF61KlJ3goQ6kV7wj9blss7DB1Nnq/hK706p/D/SX3ghBuU\nhQTj163YJjeFGeMFdaWeu8+N9Cz6ipjutyFwUT8Vquk/x1T+FzWZm5fgaMnq\nax1jtFs5XtMz9QRvCeUZ/GhiiTKUDrF5nrDhK4KrefAiIw3lKw5gssrVBMhE\nZy4BBWP0i9+p7/R3u/iGIr/r7gwBmP2fbZajnvLl34o6N0XQX4LbeJkbZDDJ\nGh9YmzWY/hyUNSis1sDHotsCO2TmDizK8npB9XP1JLGxn4HqntD+KWTojShq\nwxKdd8kNXe0dKP+0swbiaXr1FUO8o6W1G97JnoUJjMVH23/Boo2TtOlX9l2M\n7nQ5MOqf7k4D6lnXhT2nVumaD2DwqfwLrZTS0AaYpsFW7hj6BkSnls5VyJV0\nr7uDE6aFnCz+CjkWc+cZDCeaslJi0TAO/mxu15mhNJsq+Nxz5Oo0uLNXvCt/\nGkPcLh/qMtsSgNeNTTl5muu3DVM6mHztYeRDHK+gexvxa9Mw8x3Oh9wKAjD/\np6potKxu5KqSaRMGligMLjo3F8xyqFEMeuXKArT5SI0XTghIb/w7Ptuq/x2N\n2pRAZvyQ/k8Yqe870TIsBzAd5ZEhkrfPaogGQ8ToqPVCg5fIHa/bch85Dg6w\nZnXB\r\n=vAIE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHrFx7uA1qSFNQms+YsWtpJ1GWuSgWZYqYfnM9mOqDCUAiEAmiU3uh+EIJ6Og1U3yk+ow9ByL6OOx/a+hB2yonvXaKA="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_28.1.2_1547480942171_0.19930708031417788"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"29.0.0":{"name":"ipfs-http-client","version":"29.0.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http","ipfs-http-client":false,"ipfs":false},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"b2cbf2f372de03082c6741c710b353e5dc2001f3","_id":"ipfs-http-client@29.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-XO3M5a/8H3WT/12byvrq9KluFpuzLp0u2sET3/VblBC6PSyQoV+vwRP4Op4Doeq5i5VATXgV4wAVWeAt28URpQ==","shasum":"651179933a23febdc1c3419622f553c3573e4a05","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-29.0.0.tgz","fileCount":226,"unpackedSize":11998899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPbniCRA9TVsSAnZWagAAlz8P/1//NeGFGa+6KOCjNcID\n4Hrj8nwFPWQaRLibsKRXw+K0a4iwQuOUytgmX6GjyHB81yBxJrkdhNiQN1Bp\nfeUm7HfUnuL6w0mLHMQtfbeXBWgjlgRVDTMaaCsAPjjMrHpTjgDUGKU8Np0K\ngwQaUBp9qmapeWUr2S+Rrc8jj1A4sc03ceV//VeUoMMWoWGCizQIuhcsS72X\n3YoiIndq1xLI0TlFhrGyIi2uL0L5wnJTxK7a5rUnV8LJQ4dqjg5aydJHr2VS\nczWEPJSkfz5bVgUq1EmKcML4yq9etoXlBqb+HDAMp9cVXp/LdikY/9j+Mqjo\npH4STLVEdzIYhHrpLcog7JRAaJqoZ8Yr5kfW0K9nrvr8f4rDnDXmqIjQ27yM\nrzxy7XZU/+g74WmIGs249ybv2NYFOsNUISmJZYMqCpWukp2xOv0ysDarOJwp\n49orI3Fb8bq1GPHf/drtV3GgqTMbCX2aqWVfjBa3nKKolT4PAUln/yueQZHp\nginhjkD30l0ExsOkYD3vIk0IILRexbDyQUxl4GKJXUhLM9q+08Jjmzy7khj8\nYd7GOOQx7wZwdpR/wi3v69gtnYJAQhrRNA+lP5L/8sg8UtiFOQkFnBydXD4G\nmEcAYDqmdaBhq4NjW9vFG00315Wd1GZFyCCx3FCfJ82sOfotThTxjgH2VfyC\nq4fb\r\n=wrI6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDGIa+PCarza8rzzm+NHCDGXZUo8KoIOtj3Cw7UsYzfAiEAnnOOlc805X0z0dkhF4CpIaPk/Qd8vJgwxI5OI1T1Gzs="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_29.0.0_1547549153532_0.19443585361073756"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"29.0.1":{"name":"ipfs-http-client","version":"29.0.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"af6ba05963af596d90e3ac8ae104fc896f9f5148","_id":"ipfs-http-client@29.0.1","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"dist":{"integrity":"sha512-Jr6z0BkX9zADMKu+idB9K6HJdjkbX1yk+YdK7Y7MH+B85Vg8npFJXPiSnzPcgPgP0kxHWwbN4DXAy68uI3mfbQ==","shasum":"d40f2e89af9ab8ab23ca23910494986d4c24ed6c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-29.0.1.tgz","fileCount":226,"unpackedSize":11901183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSZbjCRA9TVsSAnZWagAAbn0P/jTnADItHcWpDlgYTDEZ\nrNGEirS3KswW9GkngRzM9jTVRTl2Q6X3JztdCsaOEH07LWxbFtGlWw7wMbOP\nHNIyb4Dp0QdZgZQ94RLJDCEDR4EfwMUVwDDEOPCK1nj5yKziG8nktYWqwPM0\nB594f0AZ1UsvZOtjYZiNxpN8FGZLyqfpuY2XeSg/6wJvMtALyqa7M/ca2zbG\n5MTqssf0x7DhNBLcs8b9wyVuMidg4a4wGFEoXJOQyrDiRGMXA3AScKoPrHl4\nu+P+i/vh6E77A//GWhkT24WCJpHbDPYwiGQ+5ovpRlu4URZe5gBBfI6HwZeH\nqPQOjA2GopeTwjL7FjPb1JMQ6DkdLPm5JIMi1di9hP3P7pPvwbO+kBcDfCEb\nqofhyrItlDjtho9Krje1FOccll99emwFpwRFGHNCuTw+QEfyJCf/L5R11kKW\noM/cV5OqAfnKm2WFWvKLDs0z5J4eohygdxAjX+fWBWw9ptR6JOBkudWNO/fC\n4JdFNGxaR96cJJSLVt10y9Nn2neomFFktYOuVPBWaRyFXWFun46eq2RT6fSq\nowAVvRf1Q+1YI3TbiQE7QI3joedmwtE3EFT7kMHTDT6YMLhw7yhCfst5xSe/\nJFVJxOlAPA/cg7c1cdgih0h6K9rjJJ6tn+tx79EdNFS5HKp7dZINtwTjTp9R\nUIox\r\n=feST\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeoCPbfcKTwQ/nURRn2TVc14JiuOVBFhB9+3idQ27vfAiEArbAlkkQqHJ31qBwl4OJLJcW5+lg7an9p7uEEptCOHms="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_29.0.1_1548326626513_0.6574767602292328"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"29.1.0":{"name":"ipfs-http-client","version":"29.1.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=8.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"~0.40.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"6012e673ff1e954d244693781ed13daad9f340b1","_id":"ipfs-http-client@29.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-oSdPGYyEqc7p7tj9xiFaFYVSPlzTaL1yupKoZa+iZkG99/G4ejEOdeJnkr4wlGlSKry+BZFYvELImdkEuDh7RQ==","shasum":"3a5de79e629cee5a6c423b57a2b761a7fcc688e2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-29.1.0.tgz","fileCount":226,"unpackedSize":11905175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUF1cCRA9TVsSAnZWagAAy7wP/Arb7FZNScd9zi6knf8l\ncq79MXZWPJmxyi2KVzGtgEP3iCMo0jF4e/HhcplVcEcwBMDSwMuRuG/MwZo9\nWfOjYRj9tVxN+q13vlDQZzmiJ87saJZVAT55CPr5a4u/DyEwunaRkXE93DBb\nXaMJ1JRfXG7PHpqGCY4KpTCJZqNSqRsbKsLBNnt63+MyUTLY289eSU/riKyH\n+Sh3Sb3PXJzDxK1m6dbj1op4kp6sV9aQgMDuu0fuy1sSYo3Fk2NqVG5B4zuo\nD+qLEDZQl18CQMB/9iOFlkAlljMPZKNney1QJFNIamyGVZ8m7rpiw927l83f\nABlp2MaY9eT4NFWAek6OBjtRCfJiK0szynmaukFKeZ0Nn3O+X3Yd5LAIqOoO\nCzhIrzVG+0NZitM6GkOkwEiuTWl+HEbok2YlSbWbdOj/EmfxKrMSWls6rO6u\nyKZN178Ld16O4VCB+2oqrXnbIJ/Z6Ql/iFiHdmPtbxX8PHGC3jJ0Od0/VQmf\nfY8M23xYVFoyaMV4nabckkcumuqMWxkmChH9dkT0UYhsshQn0vaFANy9fXKv\nzGd9N4VKLIux3NsUc7GBEqJQfzTjiZzCArksiVwi27wMGI9Tqsf4EHkNFpG6\nfnOSBomr4o7aWVgaxu7EDdsAL9kdC543VQ3ZB40/IzYnrsocudKitEbKpxs6\nc545\r\n=pZJW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqi8Et3kd6KU80xfWynDTfk4mOXkLpUkLBs3thAFMp8AiBVx5OsFEH3Kfbc2AE0p+cT5eYpRBnLdt7P2Ge2xbzWfg=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_29.1.0_1548770651679_0.613363539230986"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"29.1.1":{"name":"ipfs-http-client","version":"29.1.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"github:ipfs/js-ipfsd-ctl","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"ec3eee2b025461cbc8d54877f584621b8e3c94bb","_id":"ipfs-http-client@29.1.1","_npmVersion":"6.5.0","_nodeVersion":"11.9.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-aAjqZ9RwnpQECkMO058YjWG79U4w4wEKvHfVdXMhgkXDFkErxRpSqoCvwIVozbTU34NwEjWsZ9WoG0lr2FtgvA==","shasum":"dae3319621869a5ae76c3ce16ef97658b15ba3e2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-29.1.1.tgz","fileCount":223,"unpackedSize":11904120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY+cqCRA9TVsSAnZWagAAV3AP+gPp43+Qqm8Y99No+pO/\nAD8YoJWoTU8WaPo3TJitgkmRfYn6Kgw3dQ/qXLfs+sM/IAn7qE1U6E6tm9do\nZH+ZSELvKWt9d0GGUADrosfVcgHfiumvYauQPRPcOa3rMFNHRoXQeOkQXDbY\nsAwOnIl40OHVH6+SeuTgImTRwYjK1BEZC0szHwNHZE10iuybXtm/bH6wfTDV\n7buXvsrGNMEZIvfQXKelzcp6MjKdlI2HkAoFXSw658OBHUW/OdxA/quBWrUJ\nWN9yPPdss4qSec7BcItFGiEDeoO3eWuZhWrFOX1QN7McdLj6DYNMbfOFFcBy\ntLglkwTUd4nV7cS2jGpYhfzRHtqe5F8A2N/YfGPK3JkZ4ku6fkteMPELt9es\nbrfJn15bRQAE70gnzRArXsrwpHTF4YWtJgiAKuMIIOL8irqRraCOMfG/iNwC\n2mkpO09JEt69JFpN3jeN37N2EUpbw+HKIWxawsnocY8pAZkbNQQ5CjS8PWBf\nGhStg8nDhlWnE4XS0jTNJaigQ0IrtU+0TGo7X8VQTOUA9hs/8CSu52AdIPxX\nMp0K7V7JIPZIml37wsxEicf//sPKQIIFeFMFwpHJv8mK5WBx37qB429es6jQ\n4B0mqRY1MbFKdjWHt+4hTMN3M3yKmCUP6WVFm7rHoTjdHcDETSujyoECEduJ\niLPb\r\n=bx0f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5CkBwi8IEykXudnVKrtGNKe9SzMjAcbp6OWJeceZJKgIgbVHqEC9v0wlfaPcHT6PTqbCbMPl5EFTmfwZ8i3P6rYE="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_29.1.1_1550051113765_0.6643439721327722"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"30.0.0":{"name":"ipfs-http-client","version":"30.0.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","http":"stream-http"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^2.1.2","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"^2.0.0","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0","lodash":"^4.17.11","lru-cache":"^5.1.1","multiaddr":"^6.0.0","multibase":"~0.6.0","multihashes":"~0.4.14","ndjson":"^1.5.0","once":"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2","streamifier":"~0.1.1","tar-stream":"^1.6.2","through2":"^3.0.0"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.0.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"6b443f02c6f292f80712eaca862eb211903ffba1","_id":"ipfs-http-client@30.0.0","_nodeVersion":"11.10.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-0o8kxUFvIDy0NfdYPqyh/n3R4rhebHDNJWJ3XY0+cJ7Gglz0bN+4fJcEIkZt160vKeBv7hX3Si1dFKO8L7hvaw==","shasum":"30205a4c981a486103edb52acf1b53ca9646390d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.0.0.tgz","fileCount":223,"unpackedSize":11779510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciVXVCRA9TVsSAnZWagAAeFkP/iRMSf0F5CxWp8j+JZIf\nQ3fz1yCA50vK1UO2ixl+JTcmPA0X+DqPxoKqcHMbrIW4PA1PB6WP2jFfLik4\nxINs7EynKkNk6uYj+xEFEnEEGRCQFy3WDkpgUp14WII3CZ7+7naS1wuFOQnF\nQVngqDgpQerNCayzcJrarw5dbg6TO/XQ9jOtVuNUET6WAPFRXcFjEnW60E4Q\nIT2gkZoGLLA9gkGo5Hwv2lmJhfMvqVWIM1t2p1F441wNIuQyRJUeOapA2b7q\nsPeQJIW+/B7ScMLHe+OUCUPsYyzvBrNRGjDezgFvGQgNTvJaoV1x+KGTlE1+\nM36XwuAHDUKgFoiCEBs4ZcP6INaURO7dKehdNfGsme994GtfmlMVUXTccaLm\n9t7Eb2KwD/TjfyZVr6va6BVSSZccVTtk8kRzlbw7USPIkilnL7urXIVbKrz9\ncGy4a6dKLY7dFKH4KQOVa5WoNU3w+DMjTvJVioI5vbPaHgQsQPb7gin3ZTug\nObYqYb5+iV1HthIWrEOaE6kh0omMQ7d0olSTjXcxarGCOZfPFKW5Q43xLlLn\ngSf8QCfvJIT/B4Wlq1wDZ4if3AB/ugij7Vt6zxSaySiQHhwHsTe7xawc0E6o\nni9wIaqI0t9ZaesIDL8EaRb2w/9Ow6Q7xhE0GyvyTLwqPxlirxkf4vHtByZe\n8SnL\r\n=fWoo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHWiHfKgZqvZNPpNF+Hks1NHXMuPj8XIIHSFjh25HfSWAiBf3cN7ofOgj04n4rkPtul8PcxmWTIFL/GZCfuPmI8vmQ=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_30.0.0_1552504276504_0.27740707132417786"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"30.1.0":{"name":"ipfs-http-client","version":"30.1.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^1.1.0","iso-stream-http":"~0.1.1","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.0","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"bfed894f92aeb487a0de31b79a26093602970752","_id":"ipfs-http-client@30.1.0","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-yon0JgvXDXxy90x6R+Ut7nBoXEgSQI4cSmlV3KOhzMO9cIdUSDBflEWBGBSVciDBu9xxPASOh7umYV6XPz8Xlw==","shasum":"1fe9cd3cec3db13b86ee7d936d03299f5755d465","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.0.tgz","fileCount":221,"unpackedSize":9625068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJci3olCRA9TVsSAnZWagAAT+0P/1MeiEYAt8wzeyNEsGZj\n+0r3evTKuPencNiYP3l8JcdzS2i6/fInRlt23xwG3zLFUOcCgDTXFP510xst\nwKxJncYSKoaEAAAE8tnm+VlbeTOuDdvL02FepfhAZ0HJmj8sB2bsP42ED7fs\nUnvJT1wLEsP6I5rd3IuLSVfcSubUEoJE2h15g6sbwaGjvynkFyS+UVlWqy2n\nsWanliaO6WxmZPJ6pJ9iIyl/w2g1SWPCNdR+X8AmQDX+XrRyJeNuEsgNbHOC\nIeozkpOkRJ3TuZtHDmmMUA7c/gfr14q5eAUW8DIbfcshxjrG9Am0JnknwGnN\n1+08eax/AGyQZV0WVcQ3JI4SYBYjQwxs0RkXFhoaYKD7Sx+wPJFqm48DyWxn\nS3+w5RKxXgh545TrFdM2T5k6XICW7KlbwaELMTBJn3ey+4bxKba6Bu7SJheT\nt8eBtpbjLEwcVrENTBdS/bVXRjtPx7IHMU6EtAbipTACxdsewn19AkMmv7OD\nEQDfFuh8WvBvwESkwIstv2fAuNUxPPqijU2zEh2AvYKwo0mauRoSfd6OBRYY\nVIbd/Ia7sz9DJ3Vm2BLmegjAcZrrogQQzj4MUv1IrLON7laFPbbLfJnRTHVq\ngkru1LZvFltZawu+LXQCKzzd7Sv0B8Q4KsozZsnjwzQN1McqVoxwHro7eBUP\nMdFr\r\n=xb0F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxEJ97FF1hAaHUZsBFsVbBGIsTuAIIk5oaJ131ZCXJUwIhAOSZ7B6cPbc6AH5egYq8HhBz3f70805uozn1rsQyFa0T"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_30.1.0_1552644644461_0.7051574895217412"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"30.1.1":{"name":"ipfs-http-client","version":"30.1.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^1.1.0","iso-stream-http":"~0.1.1","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.0","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"21cdcc5100b32e3ac1e75ec70022b9b28b0aede1","_id":"ipfs-http-client@30.1.1","_nodeVersion":"11.11.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-tMqSwEhW57VnjHDBLjKKlgtAvlhkqVSR3oIFC0IiGnaM1nzcw7pbFBoHaFzl0PKIuXm40a5bJt85Rm2trYx+Ag==","shasum":"f52af0d955c154cbc571e6b060790d85df624ee2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.1.tgz","fileCount":221,"unpackedSize":9630064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnIr/CRA9TVsSAnZWagAAWCIP/iYQuW7tbEZSNZSksUqJ\nCKW1LwaqoyWdlVRO8qoCs8q63iAYcvGxEo4HCwoPVGAG8yquuhmWZCEkzD/s\n/tsgVDExOSZ6wZcjY8aclLUjakxcgPuzUF6hU+RY+CVmdqVHk6INe0qNxEH1\nTzQ+nPTeQ7qBIOqTyxL54W6/WffZMR4O3REojpaSIs+5k5i8xh2nCCLBRvpN\np6ItQE01YpQKFRiEeU+AkHpMb050lzEP2vmzw3CQhWJI4lVgtlsyDakqHlg5\njopmPLmjaD5c70wY8CpZP4rR0PVUclwYEmaByUJXLjbcvcuQY6OwQZ5UiRad\n+Q8+uTL2nAJBWi8elv833CLu+VEXD9FAaoOZBngWdZQZkYfE3La3jHUn1kF5\nTDQFu2RRAuFehNJbLVKAXlwZYDy/AKX/BhMYKq1EMhF/AcIziX2oS5yG4+Ln\nMUCRq215RKcOnGCDvQ/JLAhlon62PCZBfzQFd9JQpp6hrFQ27gQQEVHvwrAK\nzSGEVpdmMX42piVhk7V1oNuwhmdYMr9QZSQZL2I/sEVmUgorGy+T7shHni0O\nAp1CinvXxrPEcG2WTEtUMa0Ie3mQwmOMkD7U9fFHEsK/XpYEd2UysPJ8NKjP\njYo4lpddXdLRPb694AnLDRCI0zYAmJJ4Gli7fbtefCIoDHwov4NeVQetFiVt\nUXdL\r\n=tx++\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEVCfqBDQ5dq81Gszxpvi/BZkhAOXXUlri41AW4PjVVAiEAkZG4RdpwpaAPVsn77DlvoAaL29pQQ63Mf+xAdChQJ3s="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_30.1.1_1553763070535_0.7803422600527923"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"30.1.2":{"name":"ipfs-http-client","version":"30.1.2","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","cids":"~0.5.5","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^1.1.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.0","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"bf3dc789e8e1bded7c54937769c9278c32d9c9b5","_id":"ipfs-http-client@30.1.2","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-WhK9kzUw8+mYgZoidplxUAy5C3XJNfrfDsWREg11PT+XFeyROsMByRlcKkW/xDwOZsu0+wBuFGRkIKBoETTdLg==","shasum":"63aa99e54e846e77412902810fb9e3d87216fb06","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.2.tgz","fileCount":221,"unpackedSize":9632900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrL8XCRA9TVsSAnZWagAAFc0P+QFXAkK4tqjktS6scDjw\niF+286QcTiqKMYS1DWnBUGU6cnTC5woTlhf2kuBzVh6T1gk0e+7s4rxyedG0\nhmgL73nKW9J+60xSubRO8saXyXUd9jThVLbdoF20Uo9vou7tMzJPLkWmuf3z\nSXUF1Za9G4y7YfXkJV/hZCIWKR1/y8ueNDPKf2a8s6yJMTGy4X+Idlp0WAQA\nGYZFPcO9DVnWk4FLpylg1J52KIwz3EnhIDVzZyZXcLqjhmY40DZ2kNwLosbG\nM4pb4vBu2Yefag0mAPdl69D0omvPvHkDOAKBJwE5u5W7KK8gu0QNawxgfWOT\nTsKgcXmLku6wkhgINhIMLl1yMaT9qYxSubRA2U8BdWm5uCGTaNw81+YyB7Na\n0i29l/ZCzLJJb7m6PR5HBZXfp1j/put/nNo8ksBEpRhSHEcrn3favhor5nPi\n5Ks2H8WUH22EqU+ub8rx/FX6CGEg/QrWSAHhJ4s95HNKgo+3r/1QcvTzbrEt\nGhg5kgwu6dEXckv+9EjQp1P9NGYjCimgcz8e1l5iYePVxb2UuecKTEDC+RgY\nVUZLAdTqtamJ6KpYpDUVpkMB6t40226PIqaEvQwE4NtoXcMXKPeJ/f54hYFO\nuSUED1atX7cQMqBwfN/0QPzyebTB4JUauKlcu2A6vJ8s1opybiBPecKOYlyt\nQIWt\r\n=NlNZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE2sxNr3pLrwJfYzfVIZnPW9UhRkNgu1Akz0ksl1nTZRAiAhg7sQwaVEAEBbjn0vGXcC4WiCe7Rz1InsVqWrVkD3FQ=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_30.1.2_1554824982524_0.6542924758672874"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"30.1.3":{"name":"ipfs-http-client","version":"30.1.3","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.5.5","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^1.1.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.0","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"ab77171be88b080565b8b1bceb974ba218dbd4df","_id":"ipfs-http-client@30.1.3","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-NQ7WTLKUZeoKaKXrTSLAtjASRYCR0bPdsolZf16Y7Gt7o3RfiPpFF+AqvP0xbekOV3/zhFj2Qyf6ShEV4CCtsQ==","shasum":"4767ed544fcaa1ac44d6b39cb2fc85cef170899f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.3.tgz","fileCount":221,"unpackedSize":9640343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcr00+CRA9TVsSAnZWagAA8jkP/19vfKxrcGpJB3qxCvjx\nnXdVhBWUyxwKUe1iSE4Zdao9lQDwDcXNFKHPJ4NJ8ZwqOTTJ9zEzSqJxzNM9\nCaD3NBlsQhXqEDgUHpqHUAt0Q/9YyUdZJVFKSwQe/WO2W6uZTHixniqAIxOE\nCaV405NeM3jlt25wlUAA/O7oybluo/+XxByMWt5WXPGkLeXFbAPW25vdlcNE\n19Qd8vV0EztaeFML7nF/0PK6OMTAMtgWcSs3tX267vM70nz62HFkjFuBrEVd\ntBToVRmQ4S4S62zBrtvreVL1jT8fOq3WquubNT6CsQG2ryCxpE6AjRLS/Toh\niKz2SiHESHmwfejkLF3L5WaKAQOPAryO3iRm5kEEtMJt16qpCC5gpNgH4Mhc\n4Gx8LjbpQy3UWJrTkEbbTa0VF3Xzl8xZ1W46oymylLOESCWNRQBkhRN0t2b+\nxzb50WFQU5cl+1+/1Eij8/WJa8Tp8UzCYUMIxtvMSprOeDDlJPtpNKmaSTNN\nrvQ8VLatLDYoqa7e9sWPhuqzDTn1aR4+28bRMr7Qun/T2E5hHShrzRQpG5pb\n2+AkcCeqMMPRKY4gSabPOK3519l8axUOmHaBlFpzZ30siJRCZWUpb1Q1lFib\noAFUzOw7UaeyKfIsT1/Xcxc5el4htbYWxtzpWDVP/PkdGze3Q0WijV8szcSN\nZno7\r\n=lno4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmcobH1IpXC2PqkOaEOHg8T/ya4iNFrKDBXPZX8+ykYAiEAvQHWU6805Ex55FAWTZKWdNSbIecGDH4x5r589kNhXNI="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_30.1.3_1554992445074_0.937243654800312"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"30.1.4":{"name":"ipfs-http-client","version":"30.1.4","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.5.5","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^1.1.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"ab3b6ef6ad1052e98b4bb5f57fb80235d61631fd","_id":"ipfs-http-client@30.1.4","_nodeVersion":"11.14.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-ordvoPT3lAFL5qsvdYBeDGRP03gtbL6Jl+qJ9dztyhE7NJf2yhtnU3ZNqN1JMCcUK0qpGsDzX89t8dKQvI80Pw==","shasum":"d1b25178c9de7fee7752831893fb075dbfff8b82","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.4.tgz","fileCount":221,"unpackedSize":9642684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyACgCRA9TVsSAnZWagAAUaoP/ArPMFEOOEyHwOJIwYW1\nZvZkhRoP5IiFyErxlzjtoc5+V12RydSLDFm40nvkipvME0PS/4DWcRm/y6NC\nLaiAOOMHD0PasmbL6PkXGbFASSnRzsKiX67d1hUmkmCPEgCEL+Mbl5WAKYJD\n8s4CkhhKZp0qJlhl7Y7SFfk8ueynuZzMHzUNBYBYOH+uuHmVrku9q3tDXATL\nWLLUi7wXT8JZ6WZQpmXKl1zJEIQCHufbR/0C7vVLVVL/6bh0UBiXjsdkPKIv\nw6bLR5Y3S9qazcxh9ZSyxmbgt+vdMv1HWKAwjt+1wd0uRxSnjufB4tjuHIcz\nFt5JFoJBsWCYLALMBT2YAGnAHBCO37AhD0chsZ2tAxOfr7yU9nsrKKG1NVe4\nFVBGSyoz09E2qda0zhGcvbgyZTUVRGUJ1adEyab9qY6cSD+SkV95vxwL74e/\nyZGJ01WkwLbYah3x3xNaAeNw/yxOunBGAu1+N4nD9YPW6btIyzdsbxorRUhf\n/sG/aDn+wCZ6cgFe4OF4TXaNDBw3Cbr73GBbZ1EH2biR8SpkXZvtBLyK7SjZ\n+k2/kSadlc0xWtIApvfiYusRL2XzeDK/zAvhCo9uQZe62egsAVdu0QsbVsjY\nZw829X7TBKFKPaj5/iC5NRAaE1r0n61GlgJOj/HHRSwPjLty8Rjw1qbSTYkf\nkn/+\r\n=e9sk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5jD5Wi1lSPWQWKHq2OdpRPfrv56O6ZFFQ36Rp7iUYCAiBd+rvvwUC+npmWetAPEwj3LqHGgCRdy+QgKHJ5a1ZQEA=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_30.1.4_1556611231500_0.4638806123138446"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"31.0.0":{"name":"ipfs-http-client","version":"31.0.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.5.8","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=10.0.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.100.1","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"f4b89edcd9894acb68e05a8a811fdccea635d935","_id":"ipfs-http-client@31.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-JWr5+aW+SiMTZF4Q6v6Lx66Z0qbZZkD/R6J9q7l0x7ru/BjnE3SnenJ01AnHXVKKZqkI2NdnXhTd2ZQqFBfnDQ==","shasum":"e55b7e2ce825b519c02c924e6ea072416b8c8a5f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-31.0.0.tgz","fileCount":160,"unpackedSize":8975373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2WFhCRA9TVsSAnZWagAAQ2kQAIJgOAomU/mTjSyb5U3o\nnG0TcCLPYX6D7E5O3lX8lA9qT325Y00BZuYnhmvinxv/7vUzbLzIsrOePG9e\n+wHmN9MVI7un3c/GKTNfnT+tbDoqg6WdX0UPNUsLXMXngdy/qd9MaUgzqDD8\nwSNgWatwHbkJT7LeOrJi6fXG29v3YuyNyC8ntlmdpL23ibbDsGogTy75z/Kr\n7xoEusdHF9PY9JebuSeU5rejDK8O5y5oxjDN73RJRQT02bI4KVuNuX2pbp7N\nAvvnVO+54nND2dnlAsUGzHl8BMVGVJxUBXxvBdp6QUN6TFFtEeqnxu08dtvx\nFDVZfv8QS1OMis15Vm9b36F/vwoJXSImJN9cpl1d25tfn7Mwx5gPp4LViqq8\n9pmS44/o8ibIP0GDKksadXBcQW8ZsQBcO8EbB05OAdMDlZ/unTQ0bYjUzEfS\njIoGj+nDMqC/Vzxzf06Th4eyef5+qZN3B+Cch68d70aMBUX6nQEjoagEoqjk\nQlUVyI6Q3dcVIRRsNocwFjh0/8bxfU1Go8PYSipX9qJO+QKMroyoAAtMoFTo\nYBDKJ17JmIWX7VEtKeYrtJIp90VWx6hYJsJib5isOcjVUbZSlDSH+qKj5tlc\nAjAsP8wTTs7uPML3EZLVaF7v/OrI++pQ8KmzyXLRBLzYF7pkDElzYkMzymX8\nnYin\r\n=8Rn9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDM1W3sWl9wAX7mczhDHeo96CJu5O1POfngC81ecQksMAiEAsoRHkt4bf7BE15GGX7a+s9JmHcaQs0rUDKiDOrUjZu4="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_31.0.0_1557750112997_0.17114091857043445"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"31.0.1":{"name":"ipfs-http-client","version":"31.0.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.5.8","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.101.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"84117a136d05d9eb6a43e42e2a7e3dc52635efb9","_id":"ipfs-http-client@31.0.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-WqQyBdr5twvq7DUPy71bbVMRRub90UBESXEEl8Lhq0cIWYQ/Csw74ygFNnQWZ5mtVUDBQ2UtEctS/hbJUOhpVQ==","shasum":"5c786dcd1627bd8d692235ca0cea6e76d0784b12","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-31.0.1.tgz","fileCount":160,"unpackedSize":8976227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3DV0CRA9TVsSAnZWagAA7QsP/R9KLSlU7+Z7C1yNI1FR\nsp3G57QP316vRWHyys9LM3UmSn2pVV/GXmu3Odj7PMCLDdLAs+fsomoxJbmd\nu7yYbC1iotmeyqeduE9tqHt7AWkH5lLNTu8O+hADysXLgi9AIfQwYlaXFc+d\ngeVGHoT7w4D4/JcoJ7Qfw6vmilcGpvWlAUP+KyRKEdt5btsXF66AUsBysNwI\n5DS911LzoUAjWuxOodVAEXhjnAk7gJRLsF8Nx+j9crlZq7NbWO81Hi8BW5xs\nKHjLrF0c05WhIyDXuwispO/mXehHP3RWIQpNXxKKoY2Drc4nL8EVnM5QcHLT\nPYaLFccF7RV/i+sEkVXH09JWHGqyhmDFQrUmRP4E37tXSRipjLhPNgcgWt6F\nvE1NIVNp+iQyQpg1rX81nEYtWiFzaTtPqowuLl+z9/zu+BcRBO8GX6S+BpBG\nWykB5+Xvw16CE8AVhxckQBAutRytg60aE0sRdD1gic26InZcru6vq3zbi4yl\nFwRA3gMEIMB71h1XEyd7NIpG3aagqPajjSNOnWOorX8rXHluoy7sH2jp2DJj\nGEufcLx+KmX7qKrfbs3NydAhA8NAP0zspQw2G/heGxn4lp8u1eNNaMzTfisr\nqceD8fq7C4wwCnG6o5YViR9oiqoLjLD+TfTuOLkrBFIbap0J+VGducXDVF/Q\nuKiW\r\n=KYZZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2pDO+g5pDntz+K+wpcdSFoGs8KuiSI3FYpJvirUgr9gIgX1fVYAUy2+meqFsZGA8d4hEk9CyoNAgKjpQ+yWsT1Sw="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_31.0.1_1557935475366_0.14218782357497295"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"31.0.2":{"name":"ipfs-http-client","version":"31.0.2","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.5.8","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.101.1","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"8a4062a41abe4b08c19fe4b941f9b8d5796be931","_id":"ipfs-http-client@31.0.2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-8yxU3Akg4fIDuJ31ffXFtBt0/UbuH0WynejGWz6y9sa3gumlbHBkigzVoKD95R3glz/3vAb/N7870lQs7ng04Q==","shasum":"d79486b4a8b3ddd7364d6c4f262e0903907a0f3b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-31.0.2.tgz","fileCount":160,"unpackedSize":8977460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3YbdCRA9TVsSAnZWagAAhEIP/0Vmh83ijbMT99erudzc\njpeKi1I5RVNSwIOJJmEKOPcpzt/bjlR0NM5uAuVMcBv2sAwfN71pt65m/C0I\nAxNPFoT3nHpW9NK5bwDn/oUCNGIOHfJ52SC0z7Qd3KCwyEbnunAow4bROA7b\nLTSvjrk7gZBodJLFQnkYp5y24jrQvySyMO43OshnBdWlaVNCS6O63CgQoXt1\nvES5+162R4CL65YqAT8gk2Zrp2n2cBJsJDQXpwbJ69Rr75gRygb/U/vfqJZq\nChQwEQqz9RPKmh6b5ObIcs50TOr8TwTkRg395YoGe29PVWCDsWtjmtA2tESN\nGGRCw/8a4V/kTV/cglP6HUXbFzkzHLNBMTjttegVfVcBoPhrFcR9uY38XH7v\nh/HctBm/A7uTDk/LIac+LVmJgqhBJ9qJWPQF/xu4Le9fQBZyBPtrgJV0hcbP\negFsqb5fjzxN3ZplAVESHpCl6kn+cFOmrEJGftxgq12shHpDCelA29fn433a\n2gzzb9BYBUkTl9TFNHvINfoaSlxU3LbyjMOOCQ9fGMKVJccYag8Xm6K4xX6g\nB2ENVTbSTdgWMABCXzx2RvA3xMxxqB8LAEsFJcwiTRRAjBo0gcRlRdGlk0zh\n9Qx8AjnhlpoJqCMEi5laIcfCw0HoTH5RVqrY7sdFMhv9L6/jrbsJxthtLuNE\nG8la\r\n=gJ7p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIExgE46P9Sj+UDpYFyEfdmoYPeLwFRsPWjXo+Sqv0S3mAiEA0JwDpPZaKFIZrCKNhIhse2yms80mtAY4vQe8MlpBokc="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_31.0.2_1558021852798_0.9563552392409607"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"31.1.0":{"name":"ipfs-http-client","version":"31.1.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.5.8","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","ipfs-utils":"~0.0.3","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.0","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.102.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"c39206da371890c0773b2f4f68446cc5ef2a5073","_id":"ipfs-http-client@31.1.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-mTBeelb/hqsaPgBJJE+Jco8oPpEZne8Tz2Cgjsre+neZOv+NxiWXKpna6NSo32ryLlCtDFIuFEjOnIW+5fL3OA==","shasum":"dc0b93dc29627b74c966a14822477a12219ed904","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-31.1.0.tgz","fileCount":160,"unpackedSize":9024634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3dnxCRA9TVsSAnZWagAAFVsP/joIe85PblCdax7zpq1T\nSaFcPxki4tGIqc3HTsBt/f79Qr4/l3S79xLh5ezx/bzY7wBeCv3W7u5Y6lTu\nO3ml/L9oSyv6WGOe0u1UMYCi77j2bNxI5XeDgYzKhpwg412YPhAWEfUrer6u\nR/dg4ufxI4MBrIJ1DO5zvVVk3yyWLWEfLMxM6A9GNhk8zKONGs2rjjfIxuza\nqP9dQJI0Ed7+uwDrLnAHSCOKZk4B/rV4wetqIWLIw4N1boXCelc5Ue+dohaQ\n3gYi+njFzOSf0mdDU9fZtO0pN+37e3EevB84p0z5fsxTK3JSXUp5H9TDClaS\nwMCR/+sOLk7rOWYZmI6SxvqUr1YLjh6k0ezmFjwefcCAS/5lN0ecvlvcSQWC\n4mzeyZ7oFZ0k64FjS2giQE75f0r5Kc4tN1byE1Q9jz8c6wEaG/IX7T3OgW4n\nG/VW43eeOFKxDs5VUgvLmwTCiUV2q/hDyvVqm7R+3J6udHd6/b+M8P7RhxR0\nH9FA5Lf2wceK8r9sbCJT7xPv4eJlEnUoEBIBvH/DMkHM5ODigDwjJLa401gN\nW/SOumxL8L1+Yu6av8y+zuXPTnckm8PASzGT264R8EElr/6Eu+yEQ5WrBf7o\nbyqF/p4JFwmtWttkyW6RNXMaCPhQTDVJyocF5041AH9egdpk/2Jn3I+3jU7K\n6vCB\r\n=kAyK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+DpnTnlAhIDZ3OICJCtlYDQO1UDqkkJh3B8RaGc7QIAiEAgunoIRRIDIljOd12N8K4fnTRxaqk8BtqBkXFe9e+43s="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_31.1.0_1558043119965_0.736005022748845"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"32.0.0":{"name":"ipfs-http-client","version":"32.0.0","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","ipfs-utils":"~0.0.3","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.103.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"6ce77f7ecf2123cf59cdcd2698bb6c28eee0ec4d","_id":"ipfs-http-client@32.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-fhkeIs6cPmSX8Yw/93hrjGZd07pqvQ1fj5cbVNYlq78Vkrf4zLyASdwHdNBlb88zIVQxz8gm3RraXHFFYC6MFw==","shasum":"5eb0a55aba27a3fe86953d9cb36871684c0cfcf0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-32.0.0.tgz","fileCount":160,"unpackedSize":9122524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc48QXCRA9TVsSAnZWagAABjQQAKSfGfojgj91XWs1n+Tm\nnV8YyyzM+K1OyIaQhJ6mjHKEbNaNBy+n2CWaysFckiEw8P7lUeci8XKIhyrM\ndc2NqIqTpAaWoxsh/PAveHOiK2by3m3pywaF3LfLGwPgfS6JlYrJkLrAbc/U\ncB1OIGUqIAPRNRTQagG2Gxw/iCDlDl6ax6U1nGolC5CaYFvZFvtmP8iFfeUP\nCaZPrO5G0Gn2kK9hWM1rgVufxdTujcnisiGNQHzn9LiJMn8yl82qQDWM3l5N\nkbGC1Rbezf5uVzO8I8dZeDVv0I++qIdD75bAHyG4UQwkJGZMMGRH6jXccCcG\nHoHTOopNn6uviQDkANPcGyHKPu9+76A+uV5FItjOrs+94OY5OPSYtR70TCi6\nPUk5YYXOFvCloKXVTWXoprjIBSpecDcZC7dFnXylOKI94vnhE1w1NTzWXmdB\nfTnrd+KxdhLXKHpDYwy3S/r/n3COD0+Z5vczh8c+dVsFXYSoA3zyNqJVTI2c\n+fF11nRjskzovPkvR3BhBl/8udEaOWlGokvarBiQkmGm4i3xgnk3nfj9DEkD\n5sRgVB5btSIfGwOcpA+5+m1cmnU7mfXPFoZLUKHm/YS7q2e5PUsm6nMESdSl\nYiZgS+qOmHQQx0LF7FljtYpb1Dy/G7abcK1nP0oE28gRLu6FwvtulJCaC2q+\nbPQv\r\n=Eq22\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3QekXazb4bTmN6e1ofdurrLcm2ko4jTlkPS4SiuPXKAiAMycc84P5fv3P1qHosTrUKzP+gi9fh1tOfs7agPyAHGA=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_32.0.0_1558430742728_0.6149016038077282"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"32.0.1":{"name":"ipfs-http-client","version":"32.0.1","description":"A client library for the IPFS HTTP API","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^8.0.2","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","ipfs-utils":"~0.0.3","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"devDependencies":{"aegir":"^18.2.2","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.103.0","ipfsd-ctl":"~0.42.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"keywords":["ipfs"],"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"homepage":"https://github.com/ipfs/js-ipfs-http-client","gitHead":"57af61611736a27551008774c030a6486f74a47b","_id":"ipfs-http-client@32.0.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-uDJjjAg9zvuiAucBE/o0I+xHu9Q9ZoLvj0cTyk+Jf+0duom1iIt2iEEN1HW+PNnZu12zYQWV3sB+tI5TN2lo7A==","shasum":"4f5845c56717c748751e70e5d579b7b18af9e824","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-32.0.1.tgz","fileCount":160,"unpackedSize":9127234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5GrXCRA9TVsSAnZWagAACsoP/jXgRUtGoh8gBnQbx3N/\nXS2HiTn1e3KUiazHQiem1snHTprI+z/GA71npeeC0B744SLGgbmeFdl0kpiI\nr/QaKpo/PUOfvMjhVhiZ1RsJe9zC1tX6e55HsZZ5Xy6Vtt8wCkQA82DL1uAJ\n6BeAegE5hHhPeND4cmHGszzQac1BI3jka9/9LJVJ0fHxlpr3+16ZA4UCJW2T\nnvVDw+9BORLbLHR9/dHNZvejQNkDARfukMtDCJ6bLzecqVaDVtR64XsberRh\ndE1oWrqBlI63WL1hbNzn48J1ARCMucGOQ9ZlgiBfT3eL1qaIxXGITavU8Fza\nHmMvIM6Zq/tURiD0E4jyvLJlMnsJfL9GZQMzjQmYfjsfG8910EXK6lpH5uor\nANSTOEWkz0EaDfstCGbUhmKeSNqSsCPv0y4lGN1zVuwYbJzVa3FLnHBEMZyI\nSxZZ3l2Etg7e6b+IKdE9WCV4HnqIv750wxc8rW3lhn3OQBbObsMFWPsipSAn\n0iupTblZdpN/Fc6sDYa7nJS2d5+B174XwG5UOrDxrslUsgP6CDFARBM1TYRx\nYXSCcgpEcb+m9m+qxLPWkZxhk6CVHkh1SDQdKKIQ08HNIm/H2TS/BIWCaWeF\nKkjanv5jDXqQOYRokzEtiBNFB9ffeYbrxSusl+jWWLLrsvuZsNdBNBVk66UH\n2cYl\r\n=8ZVC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHzYp932984l9LqF4GNeEn01GMIP6b0f47SGLtv/ZuaSAiEApgpal/v4fIIPdZazO/TxHYZKQoguRD5PhmuXHH4ni6Q="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_32.0.1_1558473429966_0.7439399932854205"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"33.0.0":{"name":"ipfs-http-client","version":"33.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"~0.0.3","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^19.0.3","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"~0.4.21","interface-ipfs-core":"~0.106.0","ipfsd-ctl":"~0.43.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"689a5a17a6b99f83d314ee5a09fd73fca795033e","_id":"ipfs-http-client@33.0.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-TmljNXCyUdkdwIOay8OvSx9F5uoCZz9NbIEbqDy6eGSr4b8N0qt/smCdtx7pcmqPIywXTYX2aEOIh1LxIxaChQ==","shasum":"ccc75adfbd16382b47df828f8121d2dea3c3b574","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-33.0.0.tgz","fileCount":160,"unpackedSize":9021188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJbAuCRA9TVsSAnZWagAALQoP/1IvbPhLdAMP3PgHMl83\nFvCObg2eV42CAK731Cx0Zda9yFQo3RQjXee23kIMlkdzTtTX4T1XVp8+KnfV\n9R1nCkg+tU7wVclM6wfByzQTrYZT5gLk9gGV8NNye7I2bIjEZdhB1Urr3CSy\n2Yt44iiZ7ACKSWZ0JfJu2iTGLPrGWUG1j0p+7blEFBZlUWTVkBuKUWUtcGyt\nSRz8GUAH7dyYVY+B78DI1nLMjGQvaW3JLJQPDrN3o1Jy0MYlTOF6SlFHEzhO\n5U+QFLwwRHLOjMbI8Uh883nJ4LGYaw/drK6ATAzdcPwqnWAAha9T2nmWNSW2\namyRF4SjB3EPDc7MXdnqBEeDJgpBiSfhTZu/DzcFxNiV2a7GpX0LUPKCDZV4\n06kJcWqSSgRdCjwEIAZ8piq84toqxWVmh1FWIxx2HLtOgDQHeK07h8QWOqQo\n5ZfTMz3e4k8hF+uTv15CVXr4ub9+hC1vd4KW0SwJxLOzAXHdmmjG61COE9Vv\nCHJwaTZu4bN2qSxv/oEyBXMRg/sqTUVgyhX9KnMJhO81pj58/A7GTRnBFqzT\nsOF1yfNOHv76P9Ddqk+0TYML2bsTG/m/cr16eGWXVkSKgs/sqNphLPsbgwso\nBniNg6rEY9aSM8HkSyBAgdceiPis/FgZpy38VbXxckVlsyVHBcjnI7mngCwB\n+Yt+\r\n=HxFX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFQmJL4hz7TWRjqQfrRv4rXC35UynqpEEOdDX4AZ+W91AiEA+zQGFGtOAhC5kzwy0ksAKKQ19DhuZ830gteffex3GKM="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_33.0.0_1562751021303_0.031733066130101406"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"33.0.1":{"name":"ipfs-http-client","version":"33.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"~0.0.3","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^19.0.3","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"~0.4.21","interface-ipfs-core":"~0.106.0","ipfsd-ctl":"~0.43.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"d83d2830ee932cc8a9bbbf9924b04f95a33ed7c1","_id":"ipfs-http-client@33.0.1","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-Z+kOsOIKJ9BS5Lr4jhyj3JR8ko7lHG4MZReizKaDaSBCLShxmCbr6pAxQUDj3srMDKaQVHOySwHyRNnsoXX6bQ==","shasum":"28c68796d974979d03e22c8f6cca9d389f06ce9c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-33.0.1.tgz","fileCount":160,"unpackedSize":8693049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJfSECRA9TVsSAnZWagAAPwwQAJ361Gmw9TKOqsCtTD/9\n2y1TrmEHkfd8TO5rahA2saEK9AdwbZ1g23FglTj8GDaIfyWYmSW0y5yBjDOZ\nU7rsH/2I+G/DGMkLzdnpaQleA7rYo6sDtd945quaGZ9kA+v7VRukOgph0xHU\nH3NV4uXP/Jfgmkt3bvh41g0QfqG7DHJHid+S+CERwmlKLKLaQMpTXJp8/o5e\n6C0bxvODW6FCqtIVL+WSm2kIvINRuL6BGAUBQrcG1sFlIUOiyFPdbv161d37\neaMASLu/yjBGvBuFLQ3/5SIiOV1ScBycrGoiUQAG3mxB6qDLTXXdqA35nKR7\nMuzbhjBZqw2MWE/xoaFV8Qr+X+EvfnGM9iJChxm8MwHbkR/MwcoLwuHQllMi\nPbnR3ZUJ23R+wPpbEH/SxXJ5HE1BnsQa0kuo07wLkcZXcDDXzWn5fJDWR1b0\nxjeVh58o9DWOjUafiOIP7tqHi9zUNDt5rbSKzQ8exh5YT+3O5ZPKYx5Lqakd\n3B/h0JoN/Co8oi/LoulXeR75Eosiinjd50BZ4u7w7wgbsmb+Q237smol/A0B\nHYN4AoyNJfDwtUGLyzmWXykYGFIYPso1I5Kifmf/kwE+4zy5Z9O5CC2MwmaA\nCU/UYkMxONRts1RiGBPn6DZepRrRrZKJLN7hudBKI8lU41gBBq2+OUmBMrLl\nsIp8\r\n=jgGY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9Zl7N7XSWARNCXOcyoAG9d3VeACLk4kXC3OcAp986zAiAkUBBnu+FcZb6moweQ6i6jZdPZT7W0y1Wd25cNjfgn2A=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_33.0.1_1562768515502_0.6017221452945867"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"33.0.2":{"name":"ipfs-http-client","version":"33.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"~0.0.3","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^19.0.3","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"~0.4.21","interface-ipfs-core":"~0.107.0","ipfsd-ctl":"~0.43.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"a30f69269ba4c6b8794136b6f4019a069e1cc753","_id":"ipfs-http-client@33.0.2","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-pIsYIvs6KFwI/uuNf7fLkmYl2pRa9hStFatb/7IPM3XF8AYL7izWsZ7r5RUYXFOV7/iGa7cdRLdBZgO6mOjyaA==","shasum":"4da93f5ba2a2ce86c34be1b30a6357c8b2613cda","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-33.0.2.tgz","fileCount":160,"unpackedSize":8692771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJxe1CRA9TVsSAnZWagAARvYP/1BoQslBUIh5XLv90zvc\nRtNjYPOtbTajjrmY0E3oIVL7iXpWVvnA33EvzKS2/DhlFKoXB4n6jQoP/cuX\nXiNmvoPRnhdthVQZsT7nIdOCl+JFbaA+VT3ZxH0D26uuOub47NtM9d4acqWv\netBlz+U4bz0n8u17G2wf0EVpXVsX9lhJOUsVBme2BadfwYt+fjAhrCziPIKo\neglr8luiaoWdgMeINYwhFjXhzg/tE2EjnPmKLASQmAuN2Bp7x6afWounYb+O\neFPPY6PYqUYNRkcNJJCxGXF2pxQaDsMkud+hkbg/Iyf9L3HRun/T+yGMohEH\ns6niByR2A4Za1gJkt1NAe9FG+VpBRakE7EQmUnsHJ47V/dzZQV8W4dP6zXaX\nzkm4B2Q2VqkMux3qyupGwaFINlt0U8Ybl3KkD98HDQXC/SSuX8smuqcyzVal\nuouu7VxHGcnriism11k4yxDARfRlHb99SA+SBXiEWa8UBUTD0mXlerbFbW4L\nX+9+BBQrAf9iL3SqRNxjIY8w+FVGwYNed90Y3xc0ru61ACLvn5V8kmbSyHmQ\n3kQUjRhMzCjLY2Ea50dzsNiQehMgIBqbuxKSp4Nu3ych0BjgW7Hxyqif9q4S\nsWmiOVuQoKy5K5Q37h134sa58mAnJ6RDefrlbDR0Uh2OC4XikYBvJzjCD7Ud\nuxki\r\n=4vdG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxm6gSPWxfQ6sI7cCUBQjUev/9G2M4qoagFpzFAsiy3wIhANNogGhgHa50HodYPI3QoFvWWnbtN2gXHtq811SIj2ib"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_33.0.2_1562843060162_0.2209701842032039"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"33.1.0":{"name":"ipfs-http-client","version":"33.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"~0.0.3","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^19.0.3","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"~0.4.21","interface-ipfs-core":"^0.107.1","ipfsd-ctl":"~0.43.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"6d3480acc3c0052c9da27a3318578d8a76008e84","_id":"ipfs-http-client@33.1.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-hkS8nXay3DGKb/KXU1RDvTyxnvkAdhS5enlXxNXaS7yKvADlf5SEuQGYjW+VknkPPQ4FNbY3JttQ3YW+LTuoRA==","shasum":"4d3beceba27fcef26cf1940375a5f8c9d609f0dd","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-33.1.0.tgz","fileCount":160,"unpackedSize":8702679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJzZGCRA9TVsSAnZWagAAetgP/1ZKybJP27Yy436Ja/JU\n+lVvX9MET6wENDq+3y6eEsy1JoIZvSVm/2Woj0ZVa3Tdkw0ytaD1f1kis2Aa\nih18K+eNCG1sX60XO1cM974wLKMkdVQwzgCMzypxoP9Q5++P+dEwvcbGPd0P\nbqWBUbStYjtxrDZjuAXF/4mRkpkGwb9P0wz5cS9P8OrelSnz7UW5xXQbC/Q8\nVIxOjNeg/ys3n55yGXLjYMsSHq1GdYFcYPOPEm5QIxAh7UQ8yhMmRu2i0uFc\noxnqpHZllq+wD5yhx+EHzwZVo9Zl9LhIteRW6F1SSikstKjkDWfR1rvMY2m8\nphmBiKvrLhl+aPdEdOiYdfCmzIUzB/cZOzNztKzC7KOMI5Qmso8fUWLlZzFm\ntvYDso26gGx7PEkr3FFBcHOFwWP7xj4orQX+BfwypaeE+3fDS5hop4U+ZRNZ\ntQkcV3WPnbXecJjvsmeEyOJs11OfisZY65DCJa0O5455VfwpO0UnrFmomtBO\n5poB93XnKvO3ukZhH2Sq8AC4NhjX7m9hU7wkOBbUP+FLKQsxr3FZTL3efMPc\njQrszkUas5M95uf9t9yXf7gufNAJGOFYuo3yHQBbKJMjnHUe3/0j2rII4sv9\nCyNPOQC9zumQPKKTEX2OroJZEl8EZ5zzumzAEqrO1IiKOKbfChBstBu6cIAl\nRMEN\r\n=z6ep\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9v0xoL4ATREEy5Ehhv6Zo2cwNJCmfyA3nZ3JGh1znOQIhAPwDWQ9d8ABeqviSS6FqjTGh3JykXrGW874n8XxwJyhA"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_33.1.0_1562850885219_0.6925637560090652"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"33.1.1":{"name":"ipfs-http-client","version":"33.1.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"async":"^2.6.1","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.2.1","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"~0.0.3","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^19.0.3","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"~0.4.21","interface-ipfs-core":"^0.109.0","ipfsd-ctl":"~0.43.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"b65bba35368280a90aa5f7cab9c3a2ea256c50cd","_id":"ipfs-http-client@33.1.1","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-iwtLL3lOIzxXJFwLnOEtFUv1cYTuWJ0NauD7rpMEd/y4C7z6fuN6TSF4h547lxMh7sJWv+6Z0PmOA5N8FzUHJw==","shasum":"6ddc13e86f8db768093290b19537d2388c74dd45","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-33.1.1.tgz","fileCount":160,"unpackedSize":8698078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO0q8CRA9TVsSAnZWagAA2SgP/36mFRoUaC8+aISz0/NY\nmKrhUbhgUHAaXG57LHzVdfJy+P4bV6z/+NUhe7UVRacbbCTHQ0DiYPaA5Ojz\n/+DSjZZjG9UEAyM7O7WNYnze8buRAgT4FpzzzBxiLhMCqYEjZNJJglwEZ8Ft\n5kf1MLw3G2uzgsTTxt+4gqgwxF27n4ngTlwIW4nFsGrRABFb49AjaAL9/r8T\njuZEdVnjzQ2UW4vdax5rONGKxmapZSxEpbNtMWGT2mAm5Unt1HItnT6EoTiQ\nTu5Xa0uAT4Jiu81w2cOewSxGeZRrvlFGoJQyu5NTnUqjD68zoHBJkuNEuCzl\nTe7gCMHdkwSw5eMf28+j8jpVHmb2bGPrMQhFVoUlzGcn3nw3a173A+9E+TH2\nlbqcWFx/aZZGXCNAA68UosZRaWttTmEMFu18EHXH9pene0GQ/gGcY25XOOm+\nnHeBFgLAvcfd7d2VlhXW9bS5RLNEhuCTubwtNoVCXE3fkfjdwuza94Ru2lsk\nbmv1fxS3DZhQpinucXsv2iRJ1ShCQwRMavT2a/CJwZ8c7i2Nxys1zH9iqEAW\nGfqhu2K6VQwwp6aH4Z8aY1deovQonFy7lOMwgzoLjy4uX9fGMfIp/roi3QTH\nVm/UGI3PTNnIxVXAq11aDfwxXxekZ7OWIdcHD09qOMeC42iLJxtzcvLSs4wL\nRiZz\r\n=u4SQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBroUjD54D63pmQ28NA8b4w3afDAlV79UDgVNx9S2X9wIgXjwm/aFpCtuDNdw8RQrG0H+6vy+7rPSEnhwcfjEqzrw="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_33.1.1_1564166843634_0.48463625472557426"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"34.0.0":{"name":"ipfs-http-client","version":"34.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","lint":"aegir lint","build":"aegir build","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"~0.0.3","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.11.2","ky-universal":"^0.2.2","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.0.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.111.0","ipfsd-ctl":"~0.43.0","nock":"^10.0.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"33b090ad9a8b6f422db05c34d4317e620cf61e0e","_id":"ipfs-http-client@34.0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-4RCkk8ix4Dqn6sxqFVwuXWCZ1eLFPsVaj6Ijvu1fs9VYgxgVudsW9PWwarlr4mw1xUCmPWYyXnEbGgzBrfMy0Q==","shasum":"8804d06a11c22306332a8ffa0949b6f672a0c9c8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-34.0.0.tgz","fileCount":169,"unpackedSize":8964606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ7mbCRA9TVsSAnZWagAA9IkP/3hLwm2U3can8lwcgc3U\nFPPzOkoEEDThDfJIFhh/KkWMrg8pzQG9vR6VFUs+h128wDdEDT9TYkK74KLi\n8BFWlO2yoXyEO1kVE0o333+dDf1cs4yDArG2C2PZH2Om5ednmJDmp9A7pjtg\n9GfBbGGmDHjzU7HBEiud62q0otF+JGxSR0Y67eo01s9zofJTjwOAKFrtFRwn\n0VQDrscHtyTgojWRfuwDzbQJF/F7Tytth0uWXOGSFnSJ5ORsH6r9tiFHgJNE\nfJN5PqaAhJTQDe3b8EAbvPEGKnaNhfpGlvq28Yg0n0dqCKnXHgSasaAbNVI4\n6xILWvCOftR/fP+6zKVAx36uI2RoZs4nRFyZnw3bx/+2It/m3b86f+gORkKB\n7Rq3cnCP0EC8Cyie6xxkgBsaNmGQu93h8HIjNE5553Jpu2RjKWA09wR0V6Xg\nf4oii6keO47dsbH5r3rWXlwHwqYL6OdaTWH8DLSdUKUD3TzYRIxgW8+Mn9/8\ndIyKkWzvcvPBBio/93vdtjMSFaoy9lXXglTq5gXJbBOliiaEpsitcTYBRfGw\nGMqQd7xA/JvTtHNv1fpbgnqvHM/DxlXzx7ASYMsXg2judMyb8wwoW0EWDhzL\nQB4zg+qYTIWefqnHmUVtRwIOEyPziTESs4iPRlloG+tZQjgOJ4MmxkyOY0ux\nfyUS\r\n=uDNi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwFN1WNQ4z94ZrDvbNveE21LV5tMylPU9TNDFc4GV9LAiAgYJltI2UWZzdNRcz8LNGeXdTyqSzcSnrC+Al9BCLPlw=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_34.0.0_1567078810166_0.05697924764091056"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"35.0.0":{"name":"ipfs-http-client","version":"35.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.1.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.13.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.0.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.112.0","ipfsd-ctl":"~0.45.0","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"eb31b6c7786386a8f231702a4375ea6a1613cf88","_id":"ipfs-http-client@35.0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-nSiuaLOQQFSdd49GvPihDvpD7lbiyQhSrXm0Hgx8akJQiVARsI5wJ3ZlBSYArFTiplQKOI/aNar7St6lKV7boA==","shasum":"1b9418736010a66af786664f37509af4b37b78e2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-35.0.0.tgz","fileCount":170,"unpackedSize":9110847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdb9nxCRA9TVsSAnZWagAA+M4P/1f8OKVznOdiWah2PK8R\nqgkXGiX17/HejQgHjr/3VaD7aVD2mvynJj3Oo1s5sDk3QQZ6nOJrYyx515YW\nRaYjiWxmcZp5IQ8Lh34yVrcEh8c451/nWCMJSx4dMPARns8uE6avk3Xt0Bzm\nTa58LZEf9qbf9hhxT8dQi6Zz+6yLmBd50VcbZ7bzAn+9V7X3II2uFDV/j4BM\njvWdrMinsOg2KKcN4OtxL+aASqsZHY2DNBirCbNTCTJE9k6KeuF+2NOf1Tle\ng12jCJoeizClxf2d+1D60endAciE27b1eego3Dr47siDPOXJ4ZqVpAa1ljJ7\nLqTXY4NoUtfBK4psQVBwDNJdp15UxTe4Un8TgzC+RmpZpUKGeQP0bB+OmZ6w\nMmozr5LN3Or33axZ0DDjVqLsL/afKDJ0XIQzi4/xU8p1+MwgL5ECw4ae/O6L\nJEu/1oqSdu9xHVFNDewGAYmxu5GW7hhZEilr7q2JM8BuVyr2A2RPk7STS4Hq\n+b+dbqjLJqFdCN+m8uCvIsq0H+s9cHoCcVUd3aJy807CBUEuKP4yTXkgTD9l\nabRWVkrYecLWGPdSWqAccyiCYPqGLyMxNmN8M4px1vRe5We4BLUdlNSkB77L\ncVAmUTINJENQbvZXCclpAfnsX60CDw70HztuldCroSW/V3fvt2vkZtRbyypB\ncWs+\r\n=ITSD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHfN53uWQoQM4gOem4OslttYH1wgxOhHuBtBs2Za5d5VAiEAkkdk9PewGWPMowDWxDVn2wkxYtkz6grjfdkAMTagFAc="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_35.0.0_1567611376120_0.3085871365974422"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"35.1.0":{"name":"ipfs-http-client","version":"35.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.1.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.13.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.0.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.112.0","ipfsd-ctl":"~0.45.0","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"fadc6015c2b6fdc7d444b92a239d20da8da397f0","_id":"ipfs-http-client@35.1.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-C2726d79vydHRc1GdwIWsWnm29zhV568pmQdNru63StXdaDWeijexL4BwcLQi18/JPudT4s9iLTYU1ixIJIHCQ==","shasum":"53ee45c745840112c137ebe0d254dfba49c35283","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-35.1.0.tgz","fileCount":171,"unpackedSize":9117512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdb+mTCRA9TVsSAnZWagAAjQ8P/izGEyANUTaEVNb/S1Dn\nd9rICqAzQW0tO/J2saNN3/BzwG3Uk2JslFc8BS/llFmC4zSiSU8tiv3Y7lRW\nUiWeU1JedhEEpe1Pb1dYFSMl3WintfsbjisbKuoIbnwFpKYB0TLd4umZKphU\ntYCqGraezY7MMfnbeTM7IMBXaBPM1EaZdlhM+IlmMdTuk+zRf1zkyK2vi7mf\nhbt3e+3VDOZc7YmYxyZ5BgnJdg8YIuPJtlUn4sm5SKQYLLu2X8fDdC82irCv\nB8doi+Kv3+HPVwVUQxYY5BWY5oRoqXseUVo7PwrpWZzPcKvDhVXChx7zo3CQ\nk+m5DPt0flDViTiZwN8a2slTZ97+m0aF2lRBlKivwmWZIrUacmrfutquUAFU\nfs9ZI0XxtjIj5D5BrTiRdPsgffKcSN0bJQ9lpgqCD7a0OvfA+ol+KZn91BdN\nB8dwYUumCEf7f+4IxbpWUNhNvP0fo8KJNZFXzoUIMLZIC7LnBTMlI75Ntjzy\nVfZ+xrdNl446Wmcw2p+PIN/hGKV9hr/hPYsZ9dFmjk/glxhlxsnM7FouU7Xf\nbTxzL4D5mbj/dW6mrmRSkXp3Je0HOJPnA7ZrQj9BKpzeCDhh5WiTQkXZizuA\nn8YO2K5B8+9B68enIDUpTg6CRBW6ZTy2MBhxgYb5fhNkD74c+1DzBZYBTU5G\n3Ift\r\n=R4Vv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9zRWd34pmCSQT3DDtYXlZD1iiWTVLWvYL7grAUBxQvAiEA7ntgt/tEhL6dVEgI+QkUb9GE9KVWkBG9b0r7cM7bSQk="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_35.1.0_1567615378313_0.8686932395194009"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"36.0.0":{"name":"ipfs-http-client","version":"36.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.1.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.13.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","multiaddr":"^7.1.0","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.0.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.112.0","ipfsd-ctl":"~0.45.0","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"af6a5edbc76f9e393ec11cc3ca7a6fb9b9c42d0c","_id":"ipfs-http-client@36.0.0","_nodeVersion":"10.16.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-t9CnsABeIHoXYMdGq7gtYAqiUScnv1TGMs3Q+M9SuTGBQyRdzJERm20OW9/BE2jtbBLGvrDmq+5k6bW6A6eQTw==","shasum":"f053bd0592d3143866b18e139075d58c6bc412c4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-36.0.0.tgz","fileCount":170,"unpackedSize":9372999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeMXBCRA9TVsSAnZWagAA8AsP/AyM2bxzfWjL88NIBVst\nnEkbv82towQn+tGq/5iRAQznY1WR1tFwSA4PfgHPzlQPrKZPUTDi8iUc45OG\nNpUdlFGpxayatv5wE/MDGohTGx9LGfZb9OTe9aWaP52ERrtwzXegVaXSi/QL\n7TMbLVXMY2IBz0pG7wNwQMyNwuI6hfGmqxxSpxxtUYeoNrLyuNCR36i3PSUe\nhf/gkwX2RNzPqG32D14vEjaI24f0cZu+W6QTz5hyWfUm8XGt8emVfZ4qa5t0\nclZKO/LgHkp8PqghGcDlW1zVtLwXD2OX25MNqGE3eNE1LP39ghBVYAAxr7Pz\ncrSj6UB006FkD1zqfrWinwoqW4sKk+4tWXOY3YzcBqx3423TWG+K+2JWyieP\nTCDZBEL2nlCFQRt1nQKZVJMoDoBx8Cb2kfPm0S+GswqjagVtn9v5zsEhY0D3\noK0u179cHgkFpaIGi+slFJNzM7SlhNrU33AARlUKC08yxrorjmZmaIOpCFyU\n3pMMUGL4+/FnA3kJMzw3dwJBYdcNbKpOIdXfwoPeIVBfsqQ3JXPdorR5fD/Q\nfhBvILgRajKHzdvRPyJ3tuWCwgaZj5Hx+J5erSjvfuti0MRjZtGUYM3jOCNb\nh9LeTn8Lzvn8Q+60Q0qWVj2afpTBIVw33rNxzDzh1xtXBvXL/RL3iDmjLAS6\nx17g\r\n=3m0m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHzIaZVG5qxQ/DQuEEEJLVnfgU/8L3EMDbtUS336CW4gIhAN9Utd3imO/YiQ6fLOJdlpYswvkbtCSr/hZZS20oq+rU"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_36.0.0_1568196032187_0.20087135686527602"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"35.1.1":{"name":"ipfs-http-client","version":"35.1.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.3.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.13.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.0.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.112.0","ipfsd-ctl":"~0.45.0","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"802cbe1f950a00d156448f51a64218015ed04030","_id":"ipfs-http-client@35.1.1","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-8A1M0KB/NdB2YBCr8auMtx8MGAE3O8Eb6xDTJqeonJGHNojfVafNjsEbeyep2KIpqZtD29R2Jj41a9vjRMcKNA==","shasum":"685813893a927d57f8827bd131dd2b65f93ae633","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-35.1.1.tgz","fileCount":170,"unpackedSize":9155022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfzJsCRA9TVsSAnZWagAAX4AP/1jj50To1HoG+4zRGV0L\nWDMjJE/5456iJmSb3pCMfX4olr/VTJ8v9W6MQVOhmxneZAITP9iXngucQgId\nXMeg/SIq01+Hq6bM6c5D7eDZZmjhQtMNe1oZVyapx+/abjellICWa0p7HdWA\nCJo/1+X1wZ/1b6hCX+ef2es1P84O8IUXq39ONtLYgCqUV3iUztJgGW2v57m6\nbRcb4gc7fqM5jlgiQVb4c83/aCNfe/SrJMSxjXU0Z016HfwW76eUjXN7HetR\n2m5UpPQkwUF6J6PECxRkLQetzxZdp88IuJ+Nl2xUwVo+Nl7uIM39nW6qW2CE\nZOkMLb0RVa+OdGWG13R1Emu90iHG8Usq9gXhy0SdSwxxyVU8coOcBhyD9+b8\nqQEdEzzY06Hi25EOGdOnTkAo7gB+jPxQ8jcxI8DyetO7Hooy7sgWvBT3CO+u\nsd87X69+93Zr0g5mr31zI6ZxpejcNRi5VweywVHJQusPjesKA6Qj4PkcAu7k\n4qfkKUO3+deRuZR2L3tdNQYTGOKKGl3VjqV1I5O36tsQBldURRrKml3x8Myf\n2aoB4IXu9Xj5+b3Dh4Ugjw1RvOs7Tl0savByfycTt2kvnA0Ta3eN85FM1A2q\ni9IXfTd4Nj82G5tmN46qq9ERi9pAFE7E0n89zFs45mlMkJd4GeXKP1k2t5nU\neRvL\r\n=AHYo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLdIwe5qqEKh+cBXukXShYkfAJyX2cwHhcxu8X+veWqQIgSse3C0UXlfy3ViY7IFYvm7re9Dugb0nwdwQEoMK6ZFY="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_35.1.1_1568617067294_0.7788000508416291"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"36.1.0":{"name":"ipfs-http-client","version":"36.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.1.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.13.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^7.1.0","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.2.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.1","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"~0.114.0","ipfsd-ctl":"^0.46.2","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"b89b487fdb93d6238220cdc80c0b2c701950de84","_id":"ipfs-http-client@36.1.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-tXZW/jRPL7OIbzyi2KqIHFbzbBeUJfIlM1u80x9XqWA+2ODIyMPwt3f2f6yxfQ4wf38p7LZGQeW+MnZuth0DqA==","shasum":"83cbd178019416a9c2ae6bcd72b23111ae71e34e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-36.1.0.tgz","fileCount":171,"unpackedSize":9481267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgPOsCRA9TVsSAnZWagAAkVMP/04DRunAVBtIehQlFp+Y\nkyuD2Ig/rYeRUEq7+don5iey5PbT1PgohCACckKx7ZarC18rz7eUjK1e/37/\nRIqQFX/FKDtdcsx+Ep3ft4ZiGprLSWh18/z658uOUASeT0530DmciZTj+7/z\nNCB+q2a524zKrLGx16Iu3OVt5RcEW58G3bl6/waH6z59zhIj7RETa2qIHJnv\n0Vf8TbVuZTHNwTp64Fst2+TyFqSV3YyTsv6miQTlCbhEF6ANSbAIIjZcLUdp\nfNJItW6Pu9Kf5ZKkVZqWeEnyIYwErrDz14MSymyotj/6qNttOaC7DzD5+1nb\nFlZI6N/QO5RgJl97UcqTnE2/NuwMxe6XWjW+UueZX16QlbXEflmyIVUCctNW\nCGC6lP9HgK8mVQY8b7gvBUGT0oRiYV8zhUW0tMbx1UJ1C+MbkQYEBeIh/XVE\n5nuo2+Lv2no3/jtN/LjJB6aacPVlfCoqSZeHllHyH5xNwnQr06oMcmJC+s4z\nWHExLMEUIfX5+yx7rK6lObXCwNt1zD7kfBtDjkMT/nl5xybq5yAW4nsjmrQQ\nJc9Mn16sFkllCqVy2maTNyiJdPCpjRN57SjaNcGx7DwzFlZs5Kl6uIqFUx4P\ndb/cHiIiJTu7DurMa5tceSslUTwGNAxUTCuxGotonFjlaHxPI5mKfOJvO6+K\nX2bI\r\n=Q9CG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9ONBQHuMlr+fEbwZnvYndxFQoehQfmMfXIlLPlzpIlQIgEQJggd0bZkdz75NWVf5jsIQgSQFfDF6rgLrWSPWwcJA="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"hugomrdias","email":"mail@hugodias.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_36.1.0_1568732075792_0.9657286764828954"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"37.0.0":{"name":"ipfs-http-client","version":"37.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.1.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.2.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.1","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"~0.114.0","ipfsd-ctl":"^0.46.2","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"da7b606cb6bb8668ef5e86be2acdb4550c0401e3","_id":"ipfs-http-client@37.0.0","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+Za7Shx4k9eYBYFJ8b+M0Kh3sN3cFBAOijO7Qxu/Ms4vqbKOHVeutzuRd7OaesxuWYvbl/DXZKwrY/6yDrNsww==","shasum":"48b34a2f9fef19b1d5dac01a93bf328793a6bd3d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-37.0.0.tgz","fileCount":169,"unpackedSize":9154409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgSx+CRA9TVsSAnZWagAAn1UP/2vS1POja7URRw99HEZ4\nWKb/mqGHiJschvugVs3Wav1MrgcktX4ETqD/G9JLvfiurObGT9J0lXUlQlWH\nlIpTOlcdtvT0s2nta3oFzfUPPiU+y76NJ8MVAgxTCY9jvb4SSZwlfSoAzd6h\nkyeTyzUW7I9y/k5BwxXWtsrO6rU/U0ahc/zx9gWx2xaYLksOGv65T/75Oy75\nftLYDDoUMNla+o+1Nc4KEakQnXUb1fFv7n+eZKXWbtA8reMK5DnOYIq7xvT3\n+F/LU9YRxPraNo+8CigLUezlEoV63Cdnuhf/0z4Vy+nsFAVYF0iMgOTJkF3/\nlafWEkbKM3yp8n6DsYZLhpt27uYLuc8bX51k2LDfhZjF8jctxFM/wYbwwJcB\nDa7ggQAi/joP2Auw4nYfmxgeRBD8Yo0qz5NoZkkjYg4FS6uQK8alJknYDRmT\nScgO7EVePgDz0ePoB3x17Y8rlB7Oo8ldPquHjQhHgTYU5A3my1qQ03fuuvR5\ndlE1D+Dtw/Rn7OOYTqews+EfTNEOjTRMCU3iDW5UDQqGxS2p+YEkRiOc+Fu2\nk4Jf35p4iTHmGIghBpjydjBa6PdMzqNYMTTGx7vNOidYxAZ721+lca9u4AX7\nW1r2anuxPu9OevFAdjXHUaHGLXVrM/iGtwmNOEVjyLhP3F1n+M1l9ydfgSer\nndyU\r\n=NCVQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwOd8bn8N03l8GWIP177zeXJeXEcc1ZvlMkNDB9KKUIAiBMdHNL4DGdDP2ZPCMt6XDWi0RlkmlMilMkZyxFKcqHZA=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_37.0.0_1568746621236_0.4485246882734313"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"37.0.1":{"name":"ipfs-http-client","version":"37.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.3.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.2.0","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.1","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"~0.114.0","ipfsd-ctl":"^0.46.2","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"7934103ccf1cee4c92ebcb820b0c6860836d1cd1","_id":"ipfs-http-client@37.0.1","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-gyXFjmNRZ3BW+4g0mH9xav29f3GHVFzGTGgT6ejy2RfK3YTSHRzo+Xkpt1j+krqOTQ+LyRbuGyBSbu86rcA/oQ==","shasum":"db23cac9470fab521009dce4f590179cd1be1134","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-37.0.1.tgz","fileCount":169,"unpackedSize":9159813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgVXMCRA9TVsSAnZWagAAWQ8P/15EsRTTgccgiOYTFXQj\nV4VDG3sk+vDFO9bgUySU3s6p+ooIUnX1xelyoPNv+oEsxwGNlHi3P+crs4QX\nO/3QfT10YrAs3+HbqsVR0c+vGQX2vaCr4guGHfuF4ZCJxcoa/TksVZ23X7tX\nlsHxSKK5QURvubShrhbP3cWMUAMfCHWaIUw7XpDj7rL/+jpoS2nu48ZDpiLF\nrUhgpczS+x+SMyRpYjqmqSKia6G/0LhvTqWuL6WyZQdQbK+2U35euWCxcioW\nmzZ/63p6TZ24S5hhkuvnhw25JkovhxEEDoVsTiu45nYavQ8OMdnoQiuNb1Oz\nOtEOlZZoeylbFoQYlNX00VUjqPgFNQ7Utye/wOL0PYmqLd+wvZfG/dTgj3eE\nw3hmrYCWzxlNTrLi2am5jW+Itxcqb6wtCvzpmx8QNjrVaveA4LAdg54HexF8\nYJUxv+NqAXpibyId5r1U0/zmdLb9ZSju61z5kvbxdEo+SXotAn2P00XUMFh5\n9zoe13rtjLwminPEto5VAe2+83gS0LL280emBeHSr+62bjSyqNSAZ9KrPf8X\nCxF6gbZZUBSZBWTb9NPpz9P3rlVf9+/Bo8CFfzhYeEtZUeOu9lZYrqf9afBL\ndQYVypYPlivpy/6nh7D2/8X/k4s+lxWuCluy6uhF8smMOgjyw84wZztsK9FX\npL0v\r\n=bWLH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAMUEF0U0GWayDJcqhqev8gfdXB9h9lDOQC7OTog0zgAiEAgk5WtguiDOeILFk1itr4xY4EuJs4lqvhorA0twBuZgA="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_37.0.1_1568757196083_0.10829810966315923"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"37.0.2":{"name":"ipfs-http-client","version":"37.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^6.0.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"~0.114.0","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"641c28c12f848ed3f4f61c1dc75d149e8b4eef07","_id":"ipfs-http-client@37.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-MIpiukyAPv9C+xsjiGOV4FB3Z/CPrqTujp61Z0W2P/dl4L6xx0T+ju+SrjpI3n/jrBHUVLLYfXrB2Mo+QxBSTA==","shasum":"ef91528a07254cdb33641ab80469226c447ddeaf","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-37.0.2.tgz","fileCount":169,"unpackedSize":9134715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhKF6CRA9TVsSAnZWagAAJKUP/1UGu2jwbsbmcrZ4MgW+\nKZMjRVKU5W1kB0F9smJBqDpmswlIm3q0Sbn9IuXuAwJBXrVDchAyw5zMRpgx\nknkvQQHncpq5kWro3BnvlpkCJNcQwl1+jMah91otrHq2kUNiNk/3yaMqOQop\nt75ZktyDOJPliNAvZH0Dm7JrnMpk/6rOsL+XNlNlv4DvvUDY/jXOmwE1ou8g\n4hYSqIHB6VAegYIQeuU7Z1ZuOJWT6W7RhjQNXUQdg8Vuij4nFDRq86dXMC6t\nZza0ZdPOonpwawINsyKpnxAx5ok9+AcCK88u1WOAu3ktUezAfFAAB/4HXIQk\nHPWPzgRd9Hu3v0RNpHgsrUqDNMDnZMBPFgN6wpqfieeL/cde9m9IpeBT1nzN\n6TLRE7nYK1PKCMFh5ZJ/SV7b/70+u0ufwcP9iZl6Dr2WJbrMjiSL4RaBWLch\nPWAMpL1xuh9MbADBAVa0lUJVcjGm2Piz5/dMB7unP/igCLOaKLYZlF0XHjsc\nQfS4swo8rYP4cx+UT89j1a32EvpwrJNzrnxg4mZec9p6hAkhEYVONIlqSxNg\nKlLa3w50U6cZ8ufazbtUTohlOtazxUIfPHh9yZdtfjLs/DL0iqBmeKyTPDVG\nofvuC1+0W7b2ioXGN5NG2lgooSsKcdFoe63T9JacoH3oCTV79fTrlggMjEl+\nE8nx\r\n=5+jO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu+sk+qBjsMZ3KQxUGvtlC7IzQX1+In/mZBW+ARxEdtwIhAP8s942PthaeWKcJLUR6r/3TooHSArwoKkB27V4kEFiW"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"hugomrdias","email":"mail@hugodias.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_37.0.2_1568973177851_0.9194835980578107"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"37.0.3":{"name":"ipfs-http-client","version":"37.0.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"~0.17.3","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^6.0.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"~0.114.0","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"c2bbfae9adb2bf2155adb75d15b6bd9f6a33e8d8","_id":"ipfs-http-client@37.0.3","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-yv8lVWGUWcAX5K1K5gj0uWjIBmvbS0hIhnStC4Da+RTJL09jFj9LsBYySst8F3pmU6XfqOurwihlFmK79ZChyg==","shasum":"e6ce9df741a2fecb0d1b37ea4c311586a79cec24","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-37.0.3.tgz","fileCount":169,"unpackedSize":9160763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdix4mCRA9TVsSAnZWagAA4bIP/2IsFBu3MTem/qEZy1hi\n5AwlrJ8TbuAr1UxLGKiarwTn68mB9O58olBMnvkyk2++VlEOiJZLp0y3h6P4\nj1stuOqPuWOAXqLvGhpv2YL4NGQHrnplF7xxsw1ZJJawVXEBoOkHiJEbUzIb\nX56IsMfARinz7OcEGH6HCdAB8mI9tw+m1HVvpiWn67MYGsuKe0BkcCd4fpYN\nf7h5CL3pF/Uxh/LMKpvX652uq5ga7JooI7GetOzu0zEKW8i8ezSwy86ErTii\nimgaRYD+QEQzaMQv0B7/Ckj5bMWq2kG+z++uubtQG+rKItFcltseIb3rGGId\nIayCCOk0lKIopmzmvIiNVRW9+tPxAWTtTT6DQoFHZ3hcJhZoxHwH1jDbIkau\nWi26BWmUcfFdnlFi45zHTdE7W7HAWleAHPzvGuJvkG5DvirK5raFvWuSKG88\nYGBumN0yqyD4fF6Ol8xnzA9jH1nhj/1FrjDbektekrM9ZoLEH9+8nf+t4g4S\ndne0pq6AQukkVLGFai8ODl78YfPqDpJn2NOF2CpH01mrdkEX+TzClAlXk4ym\namuBIEyW0YDN9CUwqwxWdL1TtXVMO7d0mInWs43nESgaJzgp+HVKz5CAhCZM\nNR6469REyqoan2gTcaDqpK3Lkt7Fa/TAXPVFvTe00oydyhcm9bTcS/SlBOxN\n0Oln\r\n=dw0R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJDLB4xJOsLNSROM+8ogECm5IvIoCADTNn/ZV5KwFOWAIhAMBcC0yA8RvW+Hqn0ehp1BlMxZQbVXWzXR5Fm0C82v5M"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_37.0.3_1569398310066_0.3563559100524416"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"38.0.0":{"name":"ipfs-http-client","version":"38.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^6.0.0","dirty-chai":"^2.0.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.115.0","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"55e64d43230030b65cb91aa39fc8b3ec1cea1c23","_id":"ipfs-http-client@38.0.0","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-GhPnK5bn0BkaNx5gQVXESuFrCniqv05QDsFWcjpwk11MsocGjdLV/NJwPYc8x5WO9nXOwdWIZArUP660YIJQJw==","shasum":"d9ac2f2834e5eec28cde21bd42e21221829aa2ce","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-38.0.0.tgz","fileCount":169,"unpackedSize":9153985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdi6QgCRA9TVsSAnZWagAA3OsQAI1rdrM+qNrdwo3/LLmx\nq5RCysg+g2LE4B6YgSpJoLugK8wCZuc3EvifXi3Q1joHybGTXiSdFz010fh+\ntPRFTDouZzqXv5kzUZuUlJfp7rHervl5/biDAx3egNAvug1Id9vugVcDym1v\nwUeGT13XTKUXPQtPTNg7Ci6NAUpOTtr3doc834yGfDs4mdZvn0LEHy7LhrQw\n0Z1sFy1mq0khMfOd/Vm8wzzQfRkAdfyxxsyss7QXYMdVw/BjGQ58PbF+BVOb\nQ7JRZEx8bYwi5b7ew3qYUmNHguePJirfQYvTm/QddnOC6kUFhLROpY6Nh0ys\npWAg16NVinNQVI9YYhC2jCcH2vzeRmN7e27jxYFqhIUl6wQ8CBhsNVW6aA0V\nw34QGmfB2M/vLkpsu+mjrD1jb5a2BCdE+L0TPVRQxcpnGP+sB0MYaOhaMTj/\nJRbnHlZ9JOnMqrzHL3AXeajBoTZkyOBN9OJnkXR3lpLiVhiR/toXY0HnqChO\nSAAV1vSpBxvxNS4cdbsdlyAEV4toTuL0qHinMqpxGiN3FJm46lGj+Zhzgs59\nZB6ldJhf3IUEGgsOZfVg+VthPghZluNik3SMSEGrKkxpoUHG+FZiCx299ck+\nKgHh83X37uzCrqVxICHO0eu71w4t2m1HOXBnK3Xaph2HPDY73YWDzPDYPMSc\n7Bsh\r\n=60d7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNpH60XBHSZtvr/rAoQo40bH/RmdMWvqqQ6bw4X5BqCAiADlogfCVQF9smiNGbnSILH0UButQ/q0GXvMgYqwTlF0Q=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_38.0.0_1569432607806_0.05897096433501381"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"38.0.1":{"name":"ipfs-http-client","version":"38.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.115.3","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"10060a6b3722f9117d6c30b89518b7e800844b16","_id":"ipfs-http-client@38.0.1","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-1R/qR2kpZz23jBdm+Mdje8h8GDynZVDXAIoCL4xchfeFsH7VdwWTbyhieaAsynYX5f6/KTfk1LZuulaVoJ5Fgw==","shasum":"c74c121755456d10d179207168be147e99add21d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-38.0.1.tgz","fileCount":169,"unpackedSize":9144541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlyZfCRA9TVsSAnZWagAAvpYQAJvWjO0y0RQo76vhxhP8\nmiOQrWhmSw59TFEHxuGh8IxNC6oI7Nfz267pFwbMLB2JkKaelIH9GOVSubbI\nXGD0t74bIDbOXkIv9gf7icwAfgyBRLHFYZDNqhgImTN+Colok4Ngexta6UWu\nP3ceYr+Zl7TEgEVGnQkheBKa8F2Xb683/MLmjBGi44S8MEIYesufB+uNd+IQ\nMbwzC6ox9oqLFKPAgjW7maP47/x/YJuklUFQrU7CUvaednn1QqMDQQP1hn0g\nEh+qTJmLCGMGsAobQ1H6wY/U0Ajr/mk98wFmE+TxZRSgSEudcTBrtwnhd5m4\nvr9Co/xgD3AK+bX5FMUPH/16bUhkgvA5SI1qA2dDqcLHodN7OsGYZcjJYdQb\nj6sTeyVc/fANO1OhMao68PjmhVZcs/DLqqn8IKi9gX2KMbVZJv59FDKWBBEb\nE7Mxd64irIhd7g2wt3pwU0XPdk6ebMuw0+wppxJVclXdU9awA+K8B5hfwjyZ\nArK33QZkwIYkzNKXfXqO7sqjtlSGG7HqNE4s/2dlQiHxjttUyRZhp1fXSdBn\nhFVyGPGD+yWUpVX9IxGFr+wDW3K6ZBGIdH4fJJ9t3hiGkj8OtMy9P3d/+KWt\neC+rzkxZsOkYSu/X/WrEr9ES5BYKMSl8hiLn0+YScET260fGsUVkGTb/KXg1\n6e6v\r\n=Gdf4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUihV6kov+P1cAqWUiKuQXKfYXCPH5TtXaXjlZQ4v3zgIgJz1O6m+YGj/7GlOD5kZ4RsvQ397iWgznXFkolvrBOnI="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_38.0.1_1570186846862_0.44873524576475443"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"38.1.0":{"name":"ipfs-http-client","version":"38.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.117.0","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"8c6f2b958ce98a3418669f427be50d20266708ee","_id":"ipfs-http-client@38.1.0","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-YycXUDJkLkrGIymgvg1dip1cvGwL1gInh4dUcXXgmxiBgeQKRz5tPAtRUNCBkqYYkzOyoAGSV3bu9vCIcqc3xw==","shasum":"205f6f7a0d45329c562058657a1129f47c211cb4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-38.1.0.tgz","fileCount":170,"unpackedSize":9153129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl2NWCRA9TVsSAnZWagAAnn0P/0uR+h8di2M4lpPOGLIn\nV6vcnmo/xNZNwgyh0tuLZ1CAn0i4TT5NaVg6eKwhGfziJYX4tu3B2Oj3avVW\nkIadqX+8uq00gnh4DmEA+0pbvvSwJbLD+ihifJQdSFcqUB1OPSyN39CVjWWB\ncxrz38JLLNNz5PO/z9TwD+4AGPVYW+SxSGudhM4KnSPd9WO3mkMYR0kt6SkZ\nH4HtC8JEoM/xP5yzIL3SEgM/thkNjhIApq2XKGaus2U7GN34Ug/Lg/HpS45Y\n2c1hj0kAgujoN+jWVkn6P2I6oFcw1kRTaimq1V7VXfFqESDjeya9F7fSh31r\nisV2cA6J6xsJXmUFEGGhVpLX2GkIAFHa6R72KM31I67v3xt4otoqOc1J0ZRn\nJCYGRmyIpX0hpI1s3IFXTtVR5o/deod7P1PI+O9g0Fpivzp9aqCHn1PXwW6h\n1y8+kfgpSwdN6YHGnPa4NXwpEW6oPldF/bNfF3dYC8pb5i/zmSGh8of15grR\nPS80q3iFrCByL0Po1nR6yopjz68wDgxOT2ieWIS0T8lt3lCI2rLYAZOl5ZJW\npH7te7x3O/lqxHVIVag/eZww/lyD7s1gQRZsu2SchK0qtUNfoKjKYw28RzS4\nOYRZn8JMBrui8ebC4QHemHnTr3lOcgm9HakJVOOnUCyUiMcVW9UV6fDqTdAs\nPFSG\r\n=ewD7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVjCFcdJBpf+j4qhd5n39LnaOm9A21/3ACaddUX0sCQwIgfvi4jvHrCd7Q8XYurkEETTwMsN6NFIuFF7afURiduYA="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_38.1.0_1570202453447_0.26996930860413104"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"38.2.0":{"name":"ipfs-http-client","version":"38.2.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.117.2","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"191f414cf832070e5c7074ad45711fd1182ef14d","_id":"ipfs-http-client@38.2.0","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-fREBfEKJGb0egN10NTjwSiz2HQ+e6RKRcqtL+mlzlmrt8o2jzYSHhizVvv5yPZcQ+2WmEUf1d9WJGXO+S6KY9A==","shasum":"f8f9777a64342ae87505c96e14fbceb95c351684","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-38.2.0.tgz","fileCount":171,"unpackedSize":9167671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmhKoCRA9TVsSAnZWagAAzeoP/37oNPG/ytQ3fmYsNP2Z\nCzUnhfecRQKeij1YFHIkjOMbly24aoXukjpqe9JiQ1F3BfmdvtRs9TjMzMtY\ngNA9PFhLWkzNG1/yrGx4w7b92dpBD9WETy/1fLJRhIlwnAnzTLl7fkNrQl9Z\nTrSUwgAgQyZQsmMsjutTaHWN5huGCXvm1rs8tfTyRzMKwPUloWAwUBqE60mX\ncROMTNU8ER1w5N2zh20AUnptPUQYnUgQgB4vpB5+7N8HlenhoWhyLGImYLpw\nZfKtw2Zm38KfqQqZKb3rxGGUBquIN0/d9jpGQtRXTigYs3ztzAo7P5m5VCWJ\nM7PB3kvTrBqQnKfEhhFz8OEuknOxvsAUIhALDsmNL+A/D3Sl5hIbgyBzDlO0\nlqVB3Z9k4VOTD3gAS2hpBjojJ/3WERUTU4Y9OeprbJkj0L0/KGyXtncj6sIl\nB2eZeGuAPRISC4kF2gTdw7H+mmZ2ezGEuJBUFS4bW1G9WN705+InsRcpgz0P\nZfA5wf8VBYd3fFQI+3INl630YQc95Kh0CkKjbJtCmj8/HoUsQs6zGHv51nJE\nPboPFQLIa5b4nxyAVy6RCPSJExQ6zrPjde7R0iq4uBznK3mwrdv0G3Ev6vCO\n1s/6kKjGnZaI74TaQQp5ibHwLR24s0Ktw149t1rLR5fI7fMxtDHCJIaY6e5M\nBEYE\r\n=zPRm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1UNbFzP0UL8N/etDWAxvkRhMGI44faG4FuvKgk6ihUAIgekI4915darN7dI9zBFB6/oSBCJ+hjA/fqfh2SMNRJRc="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_38.2.0_1570378407436_0.03831147796105161"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"39.0.0":{"name":"ipfs-http-client","version":"39.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","event-iterator":"^1.2.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.6","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.15.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^1.0.1","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.117.2","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"a5aa1392d01418a9618eee65328a74713bbae94d","_id":"ipfs-http-client@39.0.0","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-rtHlwy77jO6btkLcmNJedBWnKTftVZo4jiFnqnM575nf5yMkE2MpweIuUUQkGbbfWGa+AN0CzgHyuGYQAWVASQ==","shasum":"687168844816c10f85854a701c603ab72ac076e7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-39.0.0.tgz","fileCount":163,"unpackedSize":9113556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpcOKCRA9TVsSAnZWagAAZ5MP/1iSk9C7uGKRAAI73mWo\n9/S/6AsMmtryCqNbjsMS5MQdMeMGuMak5MK4R2Qiyc4LRX99CtMsFfZOK8AY\ngAIUz3ugV7+zxsEoEBvNQmiPYA3nkvetEsMY9d8Kh/DvdiI5c9pev1+edhwC\nkxpZVPcOMrX2Q8HPFkrTiOLjNgsuEIcefRLUuuXw6/zDbBEvIcHJgv/HiiSA\ntNlAPunWbyLCIufMpRJR+RwSlDmhOG/inZn9IKGxOmF2WVgrSewyRvUe/3pZ\n/8orSEj85Emwl0Uz0wEFvl2rlteAf2JrK/W+diyXRCFuJ6YcFn3k/Xd8N41K\nnFiImdsNrCHQOJ2k45UrgQm6EQSyrpP0+OjH2WB7Pic9OQOsKeP+hFMLnXHv\nbAm+Pru/MvZxUi5xC1t4L6+ECLLF3OU7Y/c5QKt8o4If0LG7kdBXH0GoKIW/\nLBomJjaTYDTd8TOop3kiKDOJ4rbQnp8X031C4RVWnQ5kNzzfCYu6PuqFQOl5\nX38nIq+/tgoQeUExv86cV2w/zEq+iYwpN/KPmjbM1s2A14scKr0if5kazzvz\nghYJ2Wh7HBgxetUB7+I5gMEiQJxfcI1j8gndX8oHwsFoYwl4UVoEFFJV6Csf\n8X+TXbxMjmt+i6ovsxLK9a8rMtiOtN3gaq1ifxLdye3gPaTwBbwifBajxcaA\ngV6S\r\n=HLh8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCnmLLz23Bg9VhjRqJFqMAPUj6VtDrm7rCg2SILKAWkwIhAIWAKlvP+MjlWs8zSaz1E1KjOrmIjdOLJ1uVpg9VKIzI"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_39.0.0_1571144583028_0.9817603318264785"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"39.0.1":{"name":"ipfs-http-client","version":"39.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","event-iterator":"^1.2.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.6","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.15.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^2.0.0","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.117.2","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"91ee5b3aaab538680c0442d54a98c6f6a1c66e97","_id":"ipfs-http-client@39.0.1","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+/nBgfPzyjUFbvvuQoz07hQtu/a5/sSloqvbIYwWhNKiWDYCXd14+n0QZCzckXHwgk6omB5KMiaiHW8wXixRdg==","shasum":"d1769c38dce85789c7cfe8dd580bde42362d8de6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-39.0.1.tgz","fileCount":163,"unpackedSize":9137478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrcfECRA9TVsSAnZWagAAgxkQAJNh0JHaUF45ZLRaOjKJ\nLFWLtyw66L8l+cdicdcYJNhvw51WcO7f5VoT4/2/dvdehZT/sl7824deT1YY\nGko84pI1ITtuwJ2UvZlmr5hjnFZKpML3BYCzp/orHsm+6tH4CAvoXyj3k7CA\n4VpfSA9D5QSDKlLcDFF4mBIMUCGsDbPQqxmq702txUTLcu0epUb38f0+LWfM\n4bVJ9AmXTZIa7fSrQNAMdKSMhnA3aJTlV27DAt/v9iEsN4Sl99F+CQeH7oKz\nl+Yb4Nv/tSlu2owpcCBr8NLaAS4IZoxKfA7yjEM3nagcH00VDeRmmaNY5R9F\ninBUNOrzzUMf57azSYkGziY/n7n76FSfiC04gzbY2r0Fc6e6t5kEbvUMQT4m\nO63VQCI/eYZSFmlN/1ZNginIPL0ynvypB65YwMEdnnreeADsJIQRRBrluCPW\n83EaOWSKwvJFb6yZTX2h02aGc0eZlcqJiL3T+VCNdRqsXPSQ1PXMv0lD6+C5\nR2ln8o+fvbjYwYni9M3m9umhN5sQq2TtGf/V8XF3SKlyxk/RwUESn/MeDPl8\ntRufGAAb5r5X/ZErDebzNhZtDk1P+M9YcxHzbZhE3lDvSEZVfLcvDeAcI2wM\nw6qhUGDMojv4+/rATdusRGNg4P/KCIXDcWQmhZ9ddo9NGWhBFG44owKKdjId\nS1ND\r\n=smPr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByFhwQ+vIQ7Fv/0xLWEvYS+A4om0um6jp5CfolEhKb9AiA2ojg2wk8NUMZQIL1BUCCnmT2TDYBMJeaSXWbMXJ2M8w=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_39.0.1_1571669955126_0.8439912798375395"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"38.2.1":{"name":"ipfs-http-client","version":"38.2.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^3.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.4","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.14.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^2.0.0","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.117.2","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"f0da24a689fba5319d01a325254041d3d0804611","_id":"ipfs-http-client@38.2.1","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-lo7CBG7sLeH+yqo2hW5kEUjXtCdy7KsCJ0B+aOrReB9TTbVgSVm2QG61iN/rIceWqqVyFEnaJZzN20f+Qhl7Ew==","shasum":"ee1a49882af8052669c97628bf67bb3971f81d29","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-38.2.1.tgz","fileCount":171,"unpackedSize":9190768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrdMNCRA9TVsSAnZWagAAO4MP/jEemKy7qdG4UBfXfgR4\nqZvI1FyX6aOQOcpOjJRMIDSl8xSS5eJlAFPJ7KEpK1pDhVVMDABwVxL77IKQ\nYIaJ5q93JlRVxxErd+tAHtK+zVDhQLPdJaI/5hbLPJ70MjjXsZ54Ot/1ke2p\n4EUaQHFrRvMXa+1a0YHWJ6ajUDvx3dycYHd1gaPDQLJsqqrhcnnS0Z6RDJ1M\nTwlV/feTElQUGlWP/PNpAz51TYlGbrgsbtHwxAgR3n15PcK4P8bla3MqQj9f\nhv3M8a+6JHJV9wTqb6c4azZpJkPtbyvPKytIOGNDHgLOEBFpkNo/eLRiV+NK\n8moMZFKR4AFaMh9wDMZCKkEKXBf6biKwTZDgNVdlKxAt0M45RNRvMM1izaqT\na0yjgkfmGlOfhzkVqTZYeEJulmqyRUsBdEw23ija8VkmScD00jYE4DuTUyY+\nuzpBwQL7WPLS+vgc7571YrJr70yO8xK4V9uwg8U5XO8w49K480dBvpgKVNuc\nJquid4vo5RlI/q/QNe+aRtgrW/fJ1133lrZzSpk/fg9vn02KS3Akeu6CiOyW\n/brJL8A22H2NVH27eVRlJzTnni1xrxMAHS8g4mITZUHXtNYePFbkg8KQiHqR\n7hlwCWhttzcFn42+z4YIcIBryMSjgi8TlEjUOrX0Ekj4I+w8xniggS5axSOb\nt694\r\n=/8ut\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDu0K9MUYDZXD7NS2LMpLblRcQBjzsdBJ1ROCjFPhB+pAIgf60WwBCxAkB0WQhYxIrkrWQLknoFUsnr4oKm7BqRVzk="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_38.2.1_1571672844477_0.41368194157233384"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"39.0.2":{"name":"ipfs-http-client","version":"39.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async":"^2.6.1","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","concat-stream":"github:hugomrdias/concat-stream#feat/smaller","debug":"^4.1.0","delay":"^4.3.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^2.0.0","event-iterator":"^1.2.0","explain-error":"^1.0.4","flatmap":"0.0.3","form-data":"^2.5.1","fs-extra":"^8.1.0","glob":"^7.1.3","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","is-pull-stream":"0.0.0","is-stream":"^2.0.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","it-glob":"0.0.6","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","kind-of":"^6.0.2","ky":"^0.15.0","ky-universal":"^0.3.0","lru-cache":"^5.1.1","merge-options":"^2.0.0","multiaddr":"^6.0.6","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","ndjson":"github:hugomrdias/ndjson#feat/readable-stream3","once":"^1.4.0","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-stream-to-async-iterator":"^1.0.2","pull-to-stream":"~0.1.1","pump":"^3.0.0","qs":"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1","through2":"^3.0.1"},"devDependencies":{"aegir":"^20.3.1","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.117.2","ipfsd-ctl":"^0.47.1","nock":"^11.3.2","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"c5edccd83ac8a72737c5b13d5a81ad0c64a6619e","_id":"ipfs-http-client@39.0.2","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-logfyeSMD2XJCqhKv8hVnSOb/NH2KDECoLeAkwIjWMYK9Yd7eqci0ZDLP4qed0wZ91GFJ09qgCO+6J8ApKrAaQ==","shasum":"f5a6f6332c0b89802bf3ef421c477e4cfa6c25e0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-39.0.2.tgz","fileCount":163,"unpackedSize":9137803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr/KFCRA9TVsSAnZWagAAgDMQAIiGIMtGEQcovSsqNOPO\n7dChHr0GsTo8JTXBSPN+bvX4A8vnhIEPxOmeMQygbktYN8KFRxnNoHsa53Mt\ncBcAhoJg4IJ3cdrQqO4IkiU95aTgQ4IA73AeDDrXO5bfm3+BXKdvYCHEv0kw\neZeAPFFxftk61uuEHfX+BjMfE5g5xQVEz0V+GKiooaAKo7ISTV60Zq2m9Cxh\nCM88NrH/T7yS09xmwpVO6nenOwe5LCeNCfDW51rDz7hDhgUE2QmxTml7rWYh\nGBLZgRRQv+vrF0jBJtFy9OUy+9Yr9+0VY5B73fuuI0mVd9zqPkBkFYm+aVHP\nbhm6hdSOIBWruMKF2q8EAssWZFUlTTLx9Nfn/qrKk//ouGeR4dJA5PmAzOev\nIIkO7Akk69wCSP7nDrO9gQOAzIcUHIX8/uWbyV7IhNpgi084MxmfRRKzNO8n\nPTxe8GNROQZ2uqnW+7Oc+XMCf9nbfbNL9WCkXPAwUfnxMPR9MZvcY4fFicxB\nKEB5wPWdlq5Gtn+5JHAjc4nlDq1DWF5KYc2n1KzMbyGj+woFyReBwj+RiLfd\njoCB8oT2d/jG5ndmV67EPGlbnBgFM3YOFYyIolktHzTIi7/N01gCV8OTQ68y\n69k7HRsBfw2EASmHExJMOmgQCwDhuYZ684ROP/JHpfPUiWK00PQJAkBxduu6\nqazT\r\n=Ksp8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGT4L8HCQwt9cZPAZLR96X5f2tf64Sirh+Muad0ovK2PAiAkxBr7tUJXiOFqb4ZmGLR8esskY9gUsdb6e1Q4IzIzIA=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_39.0.2_1571811972331_0.15142000134021605"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"40.0.0":{"name":"ipfs-http-client","version":"40.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-glob":"0.0.6","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.121.0","ipfsd-ctl":"^0.47.1","ndjson":"^1.5.0","nock":"^11.4.0","promisify-es6":"^1.0.3","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"79ff53241e0b72730eb94a2b5a1793a33c97c687","_id":"ipfs-http-client@40.0.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-zWuvk/BAL6x6Vu3rUdVmSj7GfBRp8bS08wICyYYGOT2J16Ls9zRWZ25uF/Jkwn8pSKefvsrkSRK1bNPFqLP6Iw==","shasum":"d7f99ca47c557cdccc84d361c5de277b07291093","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-40.0.0.tgz","fileCount":139,"unpackedSize":9175010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1/MbCRA9TVsSAnZWagAAJooP/2GnuxkLxzNKaBjyUMyZ\ndaskRNBZSl3jq8TfwOuLi9B40shUjA44YrU2zokTsbhtRIuUOaBJBfveRMxD\n5dno1mRna3DKQOw+yZvRlu773COl+8kUkBYHdfXocy+0AMWFlXxAJvgkxKF6\n1RxU2MjvoX3A31ZWqDLuDVcfLu2GRr1tWSwPNVyP2ERNQ46cQvhixyaUYiZy\nmeakSjD/45ArS/YTeg6M6UTALSMmA0ZqkdNDJENsNf9GOdWrQnEP5iAWYHDS\n/IAfbx9h4/73ErI5jCvXDa4ayDP0xRzKVVdOTzjOVBvlLnvR/KL8aT+6NSVB\njuL9f8OX5kg+hROLC3Wh+ahe2eWCCCOiUOFgS/lwUgDF19S+t1gwQjQBS9gm\nDMjxFLbYhDnmWOU+r/ZVainJ3cAU6bOo88DiLqkaxeDbnta+L+DicMvD3uOj\ndTU2FsNDK06hFHQeP1UQ2wORIKBMMSS9Cd2LQf/nuZrIBioqlV9zF8jjNB60\nYwo+IARGpOEcpgU2caG430Uqx4fiFhQv2084ed7/S/rmsWto3dDVHyOQCXQ6\nzoWCg4FsWUDDt8yM7qMC2ck8mOgEuTKjs9vZsOMpI4ZGk5ZSw6sLVySOM30S\nOpgTtVpstV7br8uo4lRqSIIctRJ5SZbwd6wYPYjxTmhYHTqYNjRXUpKoWHy5\nsSf4\r\n=RAmN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXX8pQ77sspbTudkopy+WZNdjQVvWyZFsQYIKZQK4tOAiA3ein6AIywNWrVKfvStcQWfvPOouDJABdNafSGi13uFA=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_40.0.0_1574433563217_0.8004117653006093"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"40.0.1":{"name":"ipfs-http-client","version":"40.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"MIT","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-all":"^1.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-glob":"0.0.7","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.123.0","ipfsd-ctl":"^0.47.1","ndjson":"^1.5.0","nock":"^11.4.0","promisify-es6":"^1.0.3","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=8.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"d95b8f16a6060c501e217ccb2835feba670ed9ce","_id":"ipfs-http-client@40.0.1","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-xGQ9kV1D9jJNiypDg8f809X7if+f1RZZqznYo/XA2JDUcgyq56N681WXPY9d2Gj/z+ywmUgMGsD/br+trH9wGA==","shasum":"441636779bbf31a871fba4ed20c46dd7d96c41dd","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-40.0.1.tgz","fileCount":139,"unpackedSize":9176131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3pxoCRA9TVsSAnZWagAAm1wP/0VdBJpgEa6oYVpAp/ol\nW0oiZWw3bze441xmXZUgDwaAN/C8X/U61FBnurMcvQaQeYKxbVE7SHtcGzcm\njrpeRgs/RidXcIyaB6abeH3/UWHQaEO1Uuo8XhmAVOSC4XyKhuoCOUpkhbz1\nOQRy3BAzAOuxxsKzHQW9/Bgw19gng0HDoAakSveZCkxKLPZRTbtHuNr9+R1f\nLUMLekVK/wp4zbERX02mcDN37Jf82elUShCGAFLaxIOBeFHpPZd6HRbnipIE\nreBOU2cbqp/LosT3fEAI+yFDAFNYsgkLKqQ1ux/BSHqkFjks+jljlr4A4Ssm\naPEN6JMOeZ/ZVNf99QZAxBVBBlWFuWxa52Qh/4OXIVGBui5rDlgBEHXrwFU6\nIWBwDFX+SiLfNdppHQP621wtodaTC3mt6VG0Sunwqf6/TW+0oBPyeaUNteXq\nfpz64O8OYy38GBQC4orjfQxZafwOQOZ2EN4860nvNM3KIFfEJfJpgthtwYQA\nDiTbV9eywwcl+diBIK8lkc/SBZWHHKoKnNhp/ydtoKk9dyzwuMveRviCkVzw\nM09Y3+6fQvWbeQvZCXJM6LtYjy1OiTuGiaQvep/nzYOJzuShGOhPeVcH4Jc2\nNhYqKMfF7uo+eE2Lma1XWXOC/W8Se3FPgzPrzNr5R0SZJc3w9a9mm9K8dl/d\naq3W\r\n=kmxT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHsnYVC27H5XYVVPngxYDKUuMzdaZpWXegYcjAsuOGSAiBP7Xz3xYtl/8BAw6vP3guu9kLq1s65xZtraBlqQNbukg=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_40.0.1_1574870119740_0.38828336849947065"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"40.1.0":{"name":"ipfs-http-client","version":"40.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.0","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-all":"^1.0.1","it-glob":"0.0.7","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.124.0","ipfsd-ctl":"^0.47.1","ndjson":"^1.5.0","nock":"^11.4.0","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"70c78d1f7e62d0890f98c799fab103d283da9e64","_id":"ipfs-http-client@40.1.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-hm1kCHDe7u6YOr65jEGVcawiSoBNrgyp5Q71Ffqojbbn1mcq8Fndao+GnOdYake647bxH6d/1QfOJ/7HJqAzZg==","shasum":"3bd8d94043b0cba001f614c125c34f8d847b4bb9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-40.1.0.tgz","fileCount":137,"unpackedSize":9016634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd78itCRA9TVsSAnZWagAAVUwP/1LsbS6tqxjfepuH4ZD3\n70XL/veHGEC9DIe7Wi/qctijQwnbCmjILCX0AoGNXDAbF4mYuIgkGmnRGjSi\nYWFcCOXfreyxv+sGerrC9HxIL6FhRi05RdqmJ4RYBNPj1ZT/nPHYP83APari\nFDR7xi4jM/f8DcehJLbTFIqVDeOMQ9u/Gj9WyJhBM9MTL2KuzZDW87wtzRXF\nQkSumYAQ5bkREyuK/KcPwHjlAuqR+5U9JJ5Tfjs0W2gF5TURCiKeaqtySTbJ\nAOXJqfIwSw0YWytRHqlnv6oclpCOhYFZz598K/ejLxkh6JPhcOoshv7YnuYq\nQ8sgGdFU0EHF0vSCGXah2TPBLL6wjPPOegzTHBzlpV+e43tLwaPFn9gKbnic\nyPigW2IVzgixDFON5Maffh3+yu8l+PeTa75lDzbb8OeQ41Yl5b6W8vG0uRcQ\n6t5Z9sI+tvwsZwD4a6AYfghHmmXcFPDoItfuZwOF0/bKwd4a/vzasbisYu+3\n0Z/gjf2XYKqK6eh2NjSdowuYLoFt0YawwN6Bhf5RGGumavKyqsH2j4NHbZbT\n97qnL3sGfo7BDaMqksSg0VXna7WJIdJ7HjqgI5+1QWJvsXemtM2txVQ+H23y\nOnB9w5qGCnTQdRbn7EVfG6n7Y2mgDs+QV829DxNlU00r9M0ljwrCssA6KO4P\nipY9\r\n=KXks\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+pyUkT2vyJtHEGjNaOiRC9ZrQPhoa5Hy3iMl8glMRCAIgfow0cI0dYtKIulZt1GSIxJh+4B5kOn2VcKs39D4feJs="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_40.1.0_1575995564564_0.32593046404645354"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"40.2.0":{"name":"ipfs-http-client","version":"40.2.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.2","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-all":"^1.0.1","it-glob":"0.0.7","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"~0.5.1","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.126.0","ipfsd-ctl":"^1.0.0","ndjson":"^1.5.0","nock":"^11.4.0","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"7042ea190c032b940763975b6553853258919dd6","_id":"ipfs-http-client@40.2.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-/V4owJjEPDi+EVggC1A7AF+re3H+uSIERAQpukCj+BLppYQHh/8r8BJSdfsUWjcX1xkIsQH3KzksG4Wk5ew3KA==","shasum":"a60716e34acc55aa0295ccc1594fbec381c32bc9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-40.2.0.tgz","fileCount":142,"unpackedSize":10629683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFxHjCRA9TVsSAnZWagAAoPcP/1qEr3LAtEQiJCkHned2\npTIUgmOWEf76Q5Xnbhk17d+JbWngLdjOnEEzm5/DSc7NP3COaCA4Y40RUh6B\na8/c/ivbE6LlUExiWI0jWfznruW3FEfxW7C8wX3RwZViXqOjMG0EUtU9Zb+d\nqxkX0PkstHKX1ewBC3VCXjdFkl7EqRKlfyWWSutTR6iRNOulosif/ItnyeIu\ntmSJGcXotPQHFrXeFFB0k42fK8OaLlDcayPTW5Wsz9bRBdFBwZhAwhe6QB/S\n0Jxu4IkJ0f4cb5w8fV4HP7StG6u49VYd5DnLL36LbSacWKpLv/LXryDanthM\n0xgyrmsTALOfewEzplvqM6GY4O4LKbNOAA2vH8dlQdtk2bMD1Rz9rIpmFrwf\nydVx6jH3m4SHTJLtpqgSSRB09NOxh18LTtPKp6os8bRMD21KuouzlOCEkkcW\nKa55RA/W1AowFfDuYXd9vxq6aDLcTQ1J0nPvqyUnRtirCkNZeuMLT5hkHdRe\nSuO6l8mVbIpqoM2Kpl4ni010PTurWd7G7s5ffcRNeqESR20BCnzRIbsXXjYy\nrEnFnYZI2NGqaavLPb3frVjo57RvhieWfs2fbaFZwtimt3yKa73oJRkWFql5\niVZOXuIsOmlWnA8DaHoxTU9PMq+65cr7Y1/b21EOwLYhVTy8IXbkwj7ioIc7\nzZzu\r\n=44XM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC66/8KLIKpG0pQvsCRm1Vq46i4SQU9cfsjf75F7pCrAgIgaTtxSOJYJPTYMoT44DzGO2vByL3AqMm6pb+iDL7WVXM="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_40.2.0_1578570210591_0.07342857874180075"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"40.2.1":{"name":"ipfs-http-client","version":"40.2.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.2","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-all":"^1.0.1","it-glob":"0.0.7","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.126.0","ipfsd-ctl":"^1.0.0","ndjson":"^1.5.0","nock":"^11.4.0","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"ed43408d53f65c61f234acdeeb05a3acfa1b6677","_id":"ipfs-http-client@40.2.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-yCJPSpWWdkKMfkOLV/iT+pPBP81l4tbU4Q7b6WeUidSP/P7OIGjobmA2nwgryRLJYbaM9hzzQjjijQZSSS6Wgg==","shasum":"4303fe33a490d36954afebf4f3b96030ec959d7e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-40.2.1.tgz","fileCount":142,"unpackedSize":10620836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF2mOCRA9TVsSAnZWagAA5ZsP/1PC8g4m5ExY77c2uihs\nmr2LPXjYCbf8ir6osHZKj2D9QIMghfzOLSl8Iwufp3n9Ta26St7WtcZw3R9v\nFnDHkDhp6eLKGoDl8sHDtojud4I3miATYuG9GkUH7aJZFZt/GBkGhABJIYSR\nra1aQHk0LMyJ0Vmkzh/cXT0pDZV9DpG8sG18+bt2aQ8tM3P+PMmbRCR6ceZC\nJa+BJzhrwRB4vptcTtjPubR5bn7lsZBQKh+r/IEDon8mQ0WpUDhClmLffdsF\n8Vb3XCi1NQvyyURkrfJ4BuMLoeUqliQugJdwVxj1X87Xgo62IjloSYWENxxI\nmmoqp/EAWYooHXAjC5vfepOEb7t2+BgYhWbnuOHSmKCmySeVnjdfYCcLARGg\nhtu8yl/8/tuziXXIUFb3zWwQaLmgyIk9JfCTg8nrZjp7caV3HJPquyiyJuOg\nRQ2Vr97Hsc8aFm/uFyvdL0leYAqr3HHxI7KUCDjihmsp5nGjWRGwpierQmEz\n4iPIJWN/+j4fONDUIVp8Kq+xb8aDFJD9QjaHX/DTkGmgNio/JFWaXriCYfdU\n2gpH2Rgv4vy0FWEzpEidzUl3sz2e22iK9Jm3qcYyj2J2QmP/DLvgbDeoPlsK\nd60Hia5VPwxdlCYjN7wJLI45k4Pr8EMQ/GCrenlykMOTs64H3ExRp8ypPCgZ\nq41G\r\n=vJxi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzcko+1IkA4vfqe6y0kGRTDcRO6N2KwHa3pUg81yqNXAiAcYIEL4wzuQmmCM099bq0vQBXDIhhxSSg077e0OCGi/g=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_40.2.1_1578592654200_0.6388308116078856"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"41.0.0":{"name":"ipfs-http-client","version":"41.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.2","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-all":"^1.0.1","it-glob":"0.0.7","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.127.0","ipfsd-ctl":"^1.0.0","ndjson":"^1.5.0","nock":"^11.4.0","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"d7eb0e8ffb15e207a8a6062e292a3b5babf35a9e","_id":"ipfs-http-client@41.0.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-G2dc5z37J27DETGZW29Jj0oo58/R0/yIb9TUf9Cb211TkVkKa+m+swe+XjnOExIZmKmHmrZMI4UtxN47jfVJVQ==","shasum":"b343955b9cf84d612c89db1fb2bb980ce4409d4a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-41.0.0.tgz","fileCount":142,"unpackedSize":9578289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGtmRCRA9TVsSAnZWagAA9X8P/2XKxLdo+CANuLeYqWzH\nzuYAcRxIf7CeruNjwJys/2+20HnpdoO8DvjiTVA1FvvPJysZyX56IDVM4pN9\n7TUGvYs/taSg6ggmeGksX/fFjxn82ThCDsVBEbO7NK4Oa39P2Xv9SpMTU+Eo\n7InXn+QkVF2oA1dskae8U/XNh4lMT0ZhHojtFl8iZWK3JnKAVaYPr1j6o1qP\nDU9gSqOZdeRDBan/EuPuXsPr6azOgoUweA7ZvpwDgSeJPeh0hY5EuXn6gt20\nnS7h7BUdmNJEopxdJ2X03YkUYqNw8tT4TRIox7L2Bo4CzzQKmT7xDezku70V\nPeE1YAhx7fukfyGdUzQKKr8J1qewSSP59GhbYTDVrdqGY0HVCXwcqbRifrD3\nn6Dff8ozuGrn2w23tAF5t0YeuVyhc0p7pxCZsjoSnSENIKoAMl1aYmlT9URu\nBfIKNsTyXvOepjXZghSDLL4uA4SXzDYt1NYJpIkb7ub0S2Ph2ebLHyacvSur\nP4E7Nq5FhEZGX0zpm7uSQ7b+B5jPbMoN2Joyvbr6EYC8e6R5+j+FvDAl/9k7\nHkyv20yXAl1+I5H+lxsz8WAmIfatJF5rx7cm0MSYwBMVCcl40fE7ckEFVkny\nqDRxl8U6ywb0Ik3NVPkSLBJB3YVIm+exxEXY2dEKPzRTo80Thj6Zm6FfcNiC\nMtrl\r\n=1nIr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsClO8A+PiGSFcyYzgemt1Giry9O9xQsloxhBC3H390wIgQhFZWNVcBtqdhA+uJZipkP0fOjLsJEpItJQ0QqNfv4c="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_41.0.0_1578817936645_0.6333377996785166"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"41.0.1":{"name":"ipfs-http-client","version":"41.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"glob":false,"fs":false,"stream":"readable-stream","ky-universal":"ky/umd","./src/add/form-data.js":"./src/add/form-data.browser.js","./src/add-from-fs/index.js":"./src/add-from-fs/index.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","async-iterator-to-pull-stream":"^1.3.0","bignumber.js":"^9.0.0","bl":"^4.0.0","bs58":"^4.0.1","buffer":"^5.4.2","callbackify":"^1.1.0","cids":"~0.7.1","debug":"^4.1.0","err-code":"^2.0.0","explain-error":"^1.0.4","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.4.2","ipld-dag-cbor":"~0.15.0","ipld-dag-pb":"^0.18.1","ipld-raw":"^4.0.0","is-ipfs":"~0.6.1","it-all":"^1.0.1","it-glob":"0.0.7","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^6.0.6","multiaddr-to-uri":"^5.0.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","peer-id":"~0.12.3","peer-info":"~0.15.1","promise-nodeify":"^3.0.1"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","cross-env":"^6.0.0","detect-node":"^2.0.4","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.128.0","ipfsd-ctl":"^1.0.0","ndjson":"^1.5.0","nock":"^11.4.0","pull-stream":"^3.6.14","pump":"^3.0.0","stream-equal":"^1.1.1"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"435e1325d519ba0815df3a199bb8b5e7838018fc","_id":"ipfs-http-client@41.0.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-oyH0hXoB+jfz4NqM+SZSpk6c9wR+9uvUO+/0eQFT6B9Ludz4zR8T5MHo7bnQoVerj9Qlv0x0wO1ckSoekaSPpw==","shasum":"0765d42e9b3dcfee8f5a13ca1ee1ad4660c19b29","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-41.0.1.tgz","fileCount":142,"unpackedSize":9431297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKWk2CRA9TVsSAnZWagAAJtEP/1O0IvpUkw52PDCI3P9X\njB1nkaE4TXZmkOiDUr2M6d1BmRqBoLc3zAFJQfKKR9BQyhRFGoZIC1NKOZd4\npqFJV+DqStc1ODl7E/raw86p1dxzq5rGC92rZfm8HyEHzIehps+T1DTw9HFr\niKhH1vu6IQZU/naUIaqUzvU5cmQayH4bprI4Ha0hVtuKfiHdnNQ7UHguTYE9\n2RMiv+pUsS0I28a+RBRDawXSGh6mvcCHAuJmntIeqExaRrhuBxivshJN0Ej/\nzJpXN1iCEdKysbn61OU9vlMUQ+9t70TuVL+3pHvHZZUcu8qe5dL9qRnxra2F\n9MWiWvMQqK3i/sjmhUubM81025ya80V76PFLRlAn1vc2/9/uWJgru/+ngCe4\n+AghQu8TDWDan5CUI39s5zulM9C/hBuvvB6EqTEt3u7TB8wgHzhlAs7FgFOv\n7PWOCFOCmBO07+2X7ggC3WQQK8es8cujX0VD4+HPI/cvW4m6bShjbNj42S3D\nb1zXUafpgJvR+fE3DmHNlIGlF0YU2WUfkUaug6tsMusmJ98xd+/AMfY6nHBv\nNLeXkyLLr4obRnSGsG7dYt1HpZJdzf7uRN21WQi3VlbeEgsLnjyZPG56hB88\nW9KTbSHNwyIivYR+riYchPs4myVFWzGpnSb4WaXIV3YpUr9wPggZUq2YiGMr\nTpA4\r\n=c5aR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBem1l5YZZavTqFuokjcawIMH/lrCYmJcIqdJ+wDqBISAiALk6BqQ+PN7q0lS2SXtOZ58lShI6FIfoc2xlbvZVaeWQ=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_41.0.1_1579772214033_0.8088585404378048"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.0-pre.0":{"name":"ipfs-http-client","version":"42.0.0-pre.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.7.1","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.129.0","ipfsd-ctl":"^1.0.2","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/bundle-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [unpkg CDN](https://unpkg.com/).\n\nTo always request the latest version, use the following:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nNote: remove the `.min` from the URL to get the human-readable (not minified) version.\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client@9.0.0/dist/index.js\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n- **Contribute to the [FAQ repository](https://github.com/ipfs/faq/issues)** with any questions you have about IPFS or any of the relevant technology. A good example would be asking, 'What is a merkledag tree?'. If you don't know a term, odds are, someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPNS better.\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","gitHead":"e9aaa750beeb000f485fb31d43d2af648676dc8e","_id":"ipfs-http-client@42.0.0-pre.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-3nN2lO0AYZgR4p2pNiYRzdK38MBkNcpFrKnwbzhcKIkme0jWytNs+cofo0WEQqthKv3J1CWzjlAeUSeWCqUxKw==","shasum":"57592188315f582c777684326b2efebcff352c01","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.0-pre.0.tgz","fileCount":138,"unpackedSize":3568431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKgF/CRA9TVsSAnZWagAAjqYP+wTLcpA1iUtKzweCWAwU\nHxusP3H39UDnkySRFzat3YTTPbM5neldi2nwVOuCXbZlmgR+jXjl0rODCIo9\nTAcVTaM0CcaM6wbqI8z/j2EDs1EiSflsnz1Ar7ZT7+47m4Azfjh97k2Sur1Z\nmDLgFfCp3GMp0pq+8zWFLrI+it/o20RhE7wQEeV+s5427KfOTkt9DDR9HgCM\nuJAHgMXnduBsHvrks93DkQogEJkvOVJyAIrZRTHyoINvo2r47nMwf6WQEX5D\nEoNnxPGOjsl74ymVuTqKosvMImA6iH+5e1BkYaLGufVwzghZVzIa/faaD3NW\nvilvNVHaMHneycGhmJmWFo9URPYMK4QHWS4Y4CpRyKvssT27OTafAD2jyEiT\nEqD+FOBFpjyHE5XSN1O6t80xt6CLqEPJS+7ETmcYDqcsOm7AZdHkXME+5mx1\ns4RAhKulXiVW4gQoGEUE6SZbV5+gfkK0rkaEZWuDeLNNkho52ZuHTYUMBUKb\nsezU1L2uf1ggkLy2KE5/s6obGlxDdZNw0lVkNO4xqWD1edWTnf/cMbWMEs1s\nL9dyUp/MptKWnVychn8XXGL6iN+rV+g/Ao2EReN35ue6hakd+T38Ij3D29k7\nVUPVWTXjgsUyVklrI5vj5cBW5dNKw62gEj7Hzip2SLaA0AvBudtTvCFseUa4\nIqX5\r\n=FtTe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLS/+gbL5590WnuEJO8GNWq7N2xykpfwk+DJMrp5cKWAIgb3rny1CY+2XbqVkLFmdKFzNjj1bOBQZDr+Nsi1eSW6k="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.0-pre.0_1579811198918_0.23077269906601505"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.0-pre.1":{"name":"ipfs-http-client","version":"42.0.0-pre.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.7.1","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.131.0","ipfsd-ctl":"^2.1.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"ddce43dade36e650f32d5dc1ea96594014814f99","_id":"ipfs-http-client@42.0.0-pre.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-XJ+UPODHpR4l0dS2Z0Xf9i9xQmyhoI1C0zE1S+0/RU04g0r/mOKSq18N3FGMGtH/TLFnbyg4vdxB+nRezo/lVg==","shasum":"ac34916e7f049b3bfd8b5e70996dc90c7bf7efac","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.0-pre.1.tgz","fileCount":137,"unpackedSize":3579466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNCIrCRA9TVsSAnZWagAA904P/3+LryU39Xo+9GKkm+xE\nR+oWo6U9c9VZb1tbLMc6c0M7l/zpU9ZCJIiFRdcQj9NjipCwHW7H/JfRABRP\ncdCFxuc/bHCywmgv0WfZ5iRaNq24vZ5kRLO985l2bb8PRDsSXDLuKRCB12ns\nYsu3WhbTPcKgbsTLxa1Cd9KRfhIFglrVBe7iXfSuqb2RIok23SwepX5DZ6JJ\naymqERp/GSYH21zMQe+J5mUTdmjpU/y6/800F+9SjbbamjqOkPI5stxmofGp\nPCpECKE2ouDxG/tPVkr/FxfwZbGWef6znKAcD2TinkzgaeQzEZvjQUUjIcyY\nykfBMiPglJusW03q5uQozVtSOOsL3tWx4Gq82WE6F236fFgxoJ3PHaiNS4V9\nFcRC0xR3L8pHoTjs5Gwc4TnxppqdaUb+FG3LdLkyAp+4g4boAKGwXnAJLKwT\neglVTtdhIw/JjEWiAUXLJo/5f/Q/J0c7upgE2YdEca0w+y3bnJomg4B+4oIZ\ns8VPkWbk6RHd8lzOL3KtyOyXoH18oKs4QnZVOxMXEkFNdqwNN/TX+tYfgf1+\nq/ewakzmB2hHDRTFinmWfWi2pkmfqiVzRDPqIUG9LOQFTAac+J89RGsH34JY\n3ABRb0rjJI04UeK9X7VF5qEM3w6qYbmjE2RoxaY+8mZq733ccM/Bq9C+1DlN\nzF+g\r\n=bBTR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9vHadNv9e+KA/nO1VguVUaBwzMECXSfNxaR0rgxNl8gIgX5HnNIHdXrSlbtk2iKr90koQ2HRl+RFIwx1UO3NidwQ="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.0-pre.1_1580474922601_0.7918107585496652"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.0-pre.2":{"name":"ipfs-http-client","version":"42.0.0-pre.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.7.1","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","go-ipfs-dep":"^0.4.22","interface-ipfs-core":"^0.131.0","ipfsd-ctl":"^2.1.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"7d05429859936391a7982a37ea01fbead10a7f58","_id":"ipfs-http-client@42.0.0-pre.2","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-RZQ0h/DvHNMejy0SSBSReK4FQ8ARY4CX89jK89n9HT6fK+VfGbnEJjVhlABSokkloOvDoM23KQACyYFeHavVzw==","shasum":"d34476ba37f59cdf2904cc28caefca0077bfcbbd","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.0-pre.2.tgz","fileCount":137,"unpackedSize":3579466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNCNzCRA9TVsSAnZWagAAzwwP+QDz/EwTPJO21NwcUhLJ\nQ2YODm+QrJiZ5BKQ0Xzif1TajDexuSKVvTeZ3HrHssP2n5VUyVYUgIKUWQ/Q\nM3T0wfiH+sAGp0FVqCir6XGS/Qjjaj/6jCqYmfi8SnMzdhrre8DLvAKiCOVZ\nt1W7xAPLSIpfCFNwIMJgAwivFbG5u5Ep/fM+aDqwKDyDThwAHm/TsOe0RGse\njZ5qmsdGm835eVLnJnk56QhVv8MPC59IEfgOhcGObT1z05cru/leDKdNEnR9\nw1SJ30md2t2wNpzK887lZl3d62JqzzQrfK/MzeO6WKN2yrJDEwINsoXoxLUT\nLGk92YoLWMlkXz9sSTUTJPf6J/02ardHGAL1rSn93DhXeyprKhWUH9Lu53Gx\nNF4ZCpQj8cre2aXneKfvszX/5KNPbyPbQwExAv62TLA4/WYVy9eKsC+g4FX2\ntZ85HxtQ9Mw34ob3VhshxsxIqSYuz8YgGyWyB7PiCJe6sIVxRHZMibgLYuNi\nt/RqIt4gmwlkAfKoPElMcP1tWSAkooKg6bJvfjmY9sFB+E13PFGyhgig8wht\n6M//qyukM+4ri0k2TKcvhTiWuh+DNHC1bvgf4CyBVG8ri+oocKdfEOJzygaD\nOM3DSUSfBGgyyCK3soY0jlGP2h9rzpW4arj5AjRDEb1eySuv90w7kVB74MPg\nizV6\r\n=Hf+b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMP9w5NLDUzBVZAgHh3zcUdSBWCvsIK3hHSCze7PJD/AIgOB4XFq4191Rk4QI4pyvjBPrtvlroiSg8RWWK+H8TChE="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.0-pre.2_1580475251321_0.9366169216874141"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.0":{"name":"ipfs-http-client","version":"42.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs-http-client","bugs":{"url":"https://github.com/ipfs/js-ipfs-http-client/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs-http-client.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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","release":"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ","coverage":"npx nyc -r html npm run test:node -- --bail"},"dependencies":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"~0.7.1","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"~0.8.1","ipfs-utils":"^0.7.1","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.1.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"~0.6.0","multicodec":"^1.0.0","multihashes":"~0.4.14","parse-duration":"^0.1.1","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^20.4.1","async":"^3.1.0","browser-process-platform":"~0.1.1","go-ipfs-dep":"^0.4.23","interface-ipfs-core":"^0.131.7","ipfsd-ctl":"^2.1.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"da055dfebb3a970c4b72a8e33df825acafce5608","_id":"ipfs-http-client@42.0.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","_npmUser":{"name":"alanshaw","email":"alan138@gmail.com"},"dist":{"integrity":"sha512-ysA1splRSil7DDJuw5qK7YVwf0SygpQDRf9vrMRApcvaL8bWwqa9rJVCkMx/S8D9LAZ5VDSaJP2fmIdpvAIK9g==","shasum":"d113cb8181af3986247dc698b3c5820775a423e5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.0.tgz","fileCount":138,"unpackedSize":3570190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOVy1CRA9TVsSAnZWagAAx6AP/0o0DE3SIJcj371zdgwE\n6VTZAYm12AnYLIEkPy7G/mFqXTAKOUYqFQNRjYmVEcCJgttuvzFVaYAyTL5p\nRVmuKI1A4NIf4hQhhfIj25kUB87BfutRZznJGv0W5HegdNVMvB+f+qKxIiij\ntagbCzK6/buOuBUlfgsb94v/xfk/QdIiJXT/x/Et8+geQxjFEIoBVMcUauGu\nY1+/lXAZ6JpdGjzBRH8EiNCEK6A/pqPeigGMv9pdZXxJFvwPlevX2LfmdG94\nTybWAl+vxqxqPlQUrfIQ2uSo/hGMr23llT6t3xZDZNPufgLnDiQhdPQtVBiD\nmUSIFXhLhZTU8yEFdgy1EGYkFUOQocvrUUyEJFGc/jJPqfy6Q30rHcKxHlM9\njkk45kJmUAFXl2qWAkvsM1FvX256oIHkehaLxmcP5l+6Bs1ePQksE8F5iVjU\nggKxpHGDmuZs+7nKQELyZpxxCPP//DBHGGY95skJFqIvB6o6I4AUNiHYXCW4\nz0AF4u7Gts7LexaQDMbdYveLAO59X/B+I5STvFEMPP4a7kD7D/gcjRDqtqIk\ndSi89j3IskUq5FYvICM/uKB2mr6419/kMBZL8gV6UgR2GgQLZNvnwQE2sEx/\ndwDkX7zEJ/E2uXzzqZNyGj7k2IhN4Z5t40WHWnAbqQMZb9Q6KZrromyBEUwg\ngpj/\r\n=S4Ib\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/Z4fEYZhgLKJWiS/bu4LlfVergtd4kYSH0422h9XZKAIhALZXvJVm1J5ELXEa2TowNVROJJrhcdT9O4f4xIJ2eOa6"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.0_1580817588838_0.9750118467615307"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.151":{"name":"ipfs-http-client","version":"42.0.1-rc.151","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.2","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.2.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","async":"^3.1.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.151+6376cec","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"6376cec2b4beccef4751c498088f600ec7788118","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](examples/bundle-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [unpkg CDN](https://unpkg.com/).\n\nTo always request the latest version, use the following:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nNote: remove the `.min` from the URL to get the human-readable (not minified) version.\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client@9.0.0/dist/index.js\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n- **Contribute to the [FAQ repository](https://github.com/ipfs/faq/issues)** with any questions you have about IPFS or any of the relevant technology. A good example would be asking, 'What is a merkledag tree?'. If you don't know a term, odds are, someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPNS better.\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.151","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-le1FiwYZyfyRNUSXhwimWsoXnAsRj1BdwQOOzCbrvKXLeTT1BESw6e7frIaWhdC73rkuopOaRAsZgzxQIe3Ryw==","shasum":"e30a0705e7caf825abb4f55e9d92d6e31a1edf40","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.151.tgz","fileCount":132,"unpackedSize":204589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXQX4CRA9TVsSAnZWagAAXBcP/1+zwMQXnkVD3SzNkwSF\n/KzKdWTysmXw2+sw/JTA/vC2CvcTp/NUyP85W4C4VR6oEYktb0/f4f1ACAEB\nVwmcsY9UoZj99gNX4mU5OX3xtAV1SErWTaCokXQQzchUNncCQhv55xqh274m\nMGjkxK5mh0xopOGdQEemMn3k8JtRfbBVlJn9v9EwoKztSoAIJHYOTPsBd90s\nNIrUbsvu8ggJv9xvVPiSSzhoHBqmar4q5JimQ+Uggeoy7psQt52eNNiDWvND\n1gKzbdSw66lD4YoU2lBrFBk/BSvsUX+33Ef+Uk7+2gHmDQrXGozR7BqhPqel\nM/j4vjb9VUdXiyZbCUb1xjQzyzZMXcejK2oKyw/1b4NO1BIT9eLsFfDsMmk4\nTxxdxwxat3xySEhBas/9DQ+bcH+FcBhxZbPSj7S5fhmYkG6PHDls+pxSqYNP\nzHAW9TYeH4jj7PEIbn++rgrOyJ+/PClzt3Sm4v/RyBEEiCZ/TwSBGP9/N9cC\nduqbEXk9Savlqrka+TPwL2algYAizUS+aTOKEMKogIHkGOv09KLSf8zocrDd\nMQnlFyKWI/K3jtbzE5+2p1UugCjcYMzEbBNuwdsrKdHk63pCGCWFECjAH6Ib\n+SvLBovHmtAD9AzU5Fcc1DV4ZSusXFFwN9ufErCzrrb3WqqXvPyymlT9SxW5\nXvP8\r\n=VYR/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGi9w+T8HwHpHh/ucCVXrNE9XEmu4xiJCE+m2Jha28hSAiEA0o5MPK3Ge2oP8ct+r/H73qLtIZ2N+c1uCKSMACsbN90="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.151_1583154680032_0.06782422994505488"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.145":{"name":"ipfs-http-client","version":"42.0.1-rc.145","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.2","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.2.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","async":"^3.1.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.145+e9eca18","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"e9eca18b9531f35b19094f9c0aa5073fba07814d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](examples/bundle-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [unpkg CDN](https://unpkg.com/).\n\nTo always request the latest version, use the following:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nNote: remove the `.min` from the URL to get the human-readable (not minified) version.\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client@9.0.0/dist/index.js\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n- **Contribute to the [FAQ repository](https://github.com/ipfs/faq/issues)** with any questions you have about IPFS or any of the relevant technology. A good example would be asking, 'What is a merkledag tree?'. If you don't know a term, odds are, someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPNS better.\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.145","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-iYyhBEP2HXP+ET4mmADnZmYfDhzb+8yiyhsx6Nrt3DuaYNiQs/5Uf6j3mGT6/U2aEy3n9GvdxnariP6di6KNSw==","shasum":"7b4925d9ab64077ed8833cc45aec69ffe6415c92","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.145.tgz","fileCount":132,"unpackedSize":204589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXqpyCRA9TVsSAnZWagAAbicP/0eSmiwomdJ86DpNnjdv\nXqNGiOmeD77BdQ/TxMm5P92SQyEpUqj/meAy2wsFEmddaQ/zEjMKRFLzOlYO\n0b3g3UoSK7r60vj842xBDSXOpUtzDjFZZxFyr9uh1tgJEfOXOUl+NonIl//+\nnMer+b1EiFgdBsEFecVKV38OECI+trsKjs4fTfduB+3SQHpMxlMIAdGKMg/4\nlWLLYA3aIjjRLXTrc702PjBm8bgrhjJXt7kv+I7lfPEZFt5wNZw+Ov0+Vq5s\n0UIVn2gMak1fv8zNVJVh3goruwO2NJ6CIB3hJLoZ0OXBuo2m/hSjYFqW01ZY\nVqMQA5Wgy30ilP8pZ+dGh7h8abToUi26qAAmAbAmuP//JicMFsREf3lZ01rq\nYQUrg8kNOayFUizmiRaC47Bdm+NuqBPlf+CVQbsY9iLwrly9K44T5pDYfrKv\nw2WE0yj2XlTS1CW8fGUi/1BKqRKwPHZws3GV9qr+AxD78DyLChleLciWNro6\nnO+j0Oj4XMhJjrYF32DOYhBMick7PKD9Rb91lmAgzbw5WaAdlGwCS6YCAmRD\nz+c9kGM8ymkKFBO0cir28DK19bQC2+StluQOGQjL6+2xdVMER0u/zXYzOUTH\nJdwkDHYsHi0C5/EqgnvESH+VHOivytUDs4hKduBDMqLnEnhACA/X7MZ1JDJt\nDZ9j\r\n=/ozU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5pc7lcwHtP/ztzmi4TU914KelH8J/q3e4XE2abDsivgIhAObbNJoQo3btYrINPxWQdY1r0hdy9rSJPFCXFhYqtto3"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.145_1583262322337_0.6289154952649152"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.115":{"name":"ipfs-http-client","version":"42.0.1-rc.115","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.2","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.2.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","async":"^3.1.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.115+f381c34","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"f381c34545e5550e051b98e602c50f296e35c03e","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](examples/bundle-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [unpkg CDN](https://unpkg.com/).\n\nTo always request the latest version, use the following:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nNote: remove the `.min` from the URL to get the human-readable (not minified) version.\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client@9.0.0/dist/index.js\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n- **Contribute to the [FAQ repository](https://github.com/ipfs/faq/issues)** with any questions you have about IPFS or any of the relevant technology. A good example would be asking, 'What is a merkledag tree?'. If you don't know a term, odds are, someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPNS better.\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.115","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-Nx//tmbMN8Tql9iCfbV5tigmHcPAbD30ACtcbaT8PiddZ98CJyiwEd8gmCX5RkzkvbzFPzAWjjtncZ+T0e78wQ==","shasum":"381e7c05df834e54ae6fbe57859cc404e3eecdde","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.115.tgz","fileCount":132,"unpackedSize":204589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYfoVCRA9TVsSAnZWagAAzAgP/iZCwX57TRRu5uL7AJy/\nd5vmhUVCeGnAX4TUi3L3h5nJSLkrzPprrRyUocj+ETYYN0i/C5nsKygg26TA\nX62TuYOBSsUDWIh+g6GeEQZG4FCN46ISf68XMsgLAPehjw1y+gw+sdKpRYc1\nAb8Fqi1x0BI9a33bGw4qTBsXX5h/2GPwB+rFEfw7WzQUkbSYR7XwBrECrdh2\nrC7AHfQEkqhlGuHl7VJGIWFgvoYB2llbZ7NWhEsM8QYVWH/su/GFFZP5zeB4\nuKpyrigRwUI/FJDWfUQZMBqFEtefVK7nIeVBvMY0iIt74NbGENXQ6hYG+OVt\nWTWSR1AbyOhTNYKqjdIZP1gfiiphMqJN5yF279jflDJNxxPnqPWWvzUR6ILu\n5Ft5tSuz7tCu6HUKkTga+1eEDrzn3l0r0cB7zCOVw+HRB3AAzdPmdQEkkOte\nlHw0rXVNcXxt7VZ7/bYKcVGPmU9F+CxMN/3lB19buPdPAu6tj3MhPiTFikrn\nleTKoecXcVuMz+d9PLolWTvjb474KHUfkCbC/uekBhYM1/nePkp6YrCCW74c\n8ASmNK1fWs1W+n5L6wEAh4GSlWBeYzMB0r9OnRNUfb9YM1U4wDO5AZVsAg21\nkY63zQC1dflMc6pgG6mCu9ZR+fu/C6Qe8a9jBC67JrdAm1X0bPAjFQR1WLNK\nziUi\r\n=ueKe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv9s/O7jOML8LTO6vVIODpIx4hJJZl2ZJL3LP2fm7a0AIhALkjAnKRSu28pOXprJ3z1IBY8ULFLgwLQYU2wfO1avqn"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.115_1583479316871_0.2698264916279538"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.91":{"name":"ipfs-http-client","version":"42.0.1-rc.91","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.3-rc.91+763d2a0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.2.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","async":"^3.1.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.91+763d2a0","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"763d2a058b6800fdfa0d744bad7f0a136e59e0cd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [unpkg CDN](https://unpkg.com/).\n\nTo always request the latest version, use the following:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nNote: remove the `.min` from the URL to get the human-readable (not minified) version.\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client@9.0.0/dist/index.js\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.91","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-ABKD3Qy+y/5Wxyi85f42gUwtJCCWfcmZ5P6ogNOg3Jv5u1JUsU8YaKrltT7n0iuYAwMIYxStP+ih7qOm3JbbIw==","shasum":"8aa7537126a6f3f845fa257d996ee5b7bc195e3c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.91.tgz","fileCount":132,"unpackedSize":204183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYk5jCRA9TVsSAnZWagAA8DUP/3Ii3ihoUR1HueZxJPfV\nGFVkLMIHOrBIufYw3KyzphrbtF28Bem47kK1rdSoL6bPFX+7WkvSTbx0qOxX\nXAvj6t2KJT3VR9UOphv2pIk3zjTDFEJP+K3HRmif1Og6t9XkYNfUp4A+aZU8\nFNyyJuCYg0SHS1wvIgozoo3lymDshADnaHaSJOuXOwhZMJB7GplkSjngw3PW\n9Aq64J3Lq/1TAGyEtqKIWR4Cb13YcXyT9QcOf2cSGsrQJBAfm/vdUE+y9SpC\ngSagfee7+1qncHu53YG0S5m1dOnSSIZPtSkcgLKt1/5pCKVBMfPbfZIPn/bQ\nQsQbCNktU2iklTTCruWgTFW5G5FOUiTjGly4mFsY1FXjleuqsypIeh8pYUwB\nVoHzGmKlAOAhZqAf2SwxmutyD1G+f982bS1XWSWifeISH9wjv65u0rsDxMOB\n2AlHEs2Y9VUwELExS4w8v4p3SWRNNtuqMDWl8vCKVthsNtwlB6mKCc7AVwbY\n60Jc7e1LMMe30bq5sZg7ciX0xGRR2uI9qPclbN2UtXXBaF9sQ0jpwjvIjBZ4\nUQnVeQypGJFa/Sah4Byq5HjLoOK4M2WccsT6wu0UJqEHxcEnn1uW504X8xXi\nHNGTPgeW0Tin6mPy9N0b4Gk/vuwO28E37ceOJzXoiPJGBfj1h3Q0rFSPucCH\nMY3A\r\n=WaHp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4yB/7YncrcC7Zdh4w5dHJ6NTtII9+Gn3HblUoxu3BvwIgPX5VVgNdfZBZeLEYFg8ZlDM1uDf1M39cY07pDFHDksk="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.91_1583500899102_0.9804276823574092"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.74":{"name":"ipfs-http-client","version":"42.0.1-rc.74","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.3-rc.74+c81c680","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.2.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","async":"^3.1.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.74+c81c680","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"c81c680196f0af82c9dbe7ac1cd404d99e682b1a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [unpkg CDN](https://unpkg.com/).\n\nTo always request the latest version, use the following:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nNote: remove the `.min` from the URL to get the human-readable (not minified) version.\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client@9.0.0/dist/index.js\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.74","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-5kRb3M79SQY14IMi6yYcd5NdPbOoQ2PGv+7z8pfVRHUjrP/2ApszytwPN5NqxeD+wLBztrzFELq6OqVrQTHz0A==","shasum":"2d08d7a26484f161238704c0b6e697ff36814776","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.74.tgz","fileCount":132,"unpackedSize":204183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZk8BCRA9TVsSAnZWagAAf5EP/2wxDPrjRe5SicJCKpaj\nvuPrLkt0NdKOsJbQPyo6d+gjFk4h4DeogQl6uyimJb3wXFmM77yS47I/sPgl\ngfJBqsVYmdfAFuHxP/5Ug5FRasWgoWdT321TkBEzOut7xitizotN3iWaJPzk\n8dIZ6hmJHlXaZJ4aDTT9cuJxkFAg8EUNDIGfEGt8p81Bu4uSqSPqCLkoSsNU\nMuHTNh6T4kNhrsKq6BzMxGGE7PhrX6D5AZg+jYDyLzYPpOqm3KZYsBQdLocR\nRqc48EEsB1Vw4kni6VzYcJGsnnGR0TY+5bPamQEGco5P8+sdZtDc28jNxSHt\n9zc9zDeXgIS1EaWIXaQaOvRv3fByS2LRrGDLTvf2BbSiu6sLwbRunt7J6WjF\nBbSDDQN+2hgYvsNPyo4oZch+jtUi/g817jsRnwFcIcHxRthN1H3qpsF75vFt\nwYC9P/VZ2AxvDtM3BAfLCrUi1Zh0H1MCb5KB2jQSstzBQjBx7ECvj9jHuSPM\nuh+c9UWy6nOFljNz5oR6x/KcIhiK6tR4OR+NqZz8cFAMK8sJ7TI/ohDjqecx\nwCXNOI48jZ5NMNa2x1MupB2y8njbTOWzbd2FltvTsk0Y2Jd7gRbJ/B0dPY/a\n5nnCzbks7AUBsTL6f7wIBqdwi834K9sTlBLcgu7TVc8djARX6NwH4Kf1VVfk\n8Nh6\r\n=5N6M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWqsIYlVfb6/QoUq56V8VlPXzrWhr02n7pA8BSWvdV9QIgMzXmzMbu3AwlOIKvp06I6ztAsz9yl0FIrejc6P+2MiY="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.74_1583763200935_0.4981111240858942"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.55":{"name":"ipfs-http-client","version":"42.0.1-rc.55","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.3-rc.55+ff272f1","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.2","ipld-raw":"^4.0.1","it-tar":"^1.2.1","it-to-stream":"^0.1.1","iterable-ndjson":"^1.1.0","ky":"^0.15.0","ky-universal":"^0.3.0","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","async":"^3.1.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.55+ff272f1","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"ff272f12eeb0cc8c847f6001faeb15e79810880e","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.55","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-uTwhQHmu7EFAy+EZ4xOCaEd7mn5nQRQx40acoK6DE8wi34L9ZBNFMVV68NCLGaqM9nCMtcYTrtFL0QsFh2VyVw==","shasum":"c11f41850a3140eb66bf75741c38b835873d6f47","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.55.tgz","fileCount":132,"unpackedSize":204722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaOBACRA9TVsSAnZWagAA/Y8P+QH/GECQqI3ztt8I7lPR\n3Ot+n9q3S25M8hRmS+fkDd6L01QlUKGUBODtRGs4Z9stMVBsNn3eP4jXrtUw\nbO7dXTDJcib/1oF16IRaSYd6UtgOkk98Vqlz/KcHUtKs2P98+C8C2qPjCBDX\nF1kHUFrtb+oIn6N+cc9ule6k060wt8PjIBnK2y7/yPxoq03W3WrINCP/wv4y\nv0IsfEHX/RB0G7N1ApMvSdGC5WEPkNi3KPCXBFWyACH8GG8Wl+qzFczKI5tC\nSikA80Wy9Pm1avQ2XEZxIm9AWRtQWDD+s5CiNdDnGWYLmmCAhaC1WYt0McEP\nc3V8MOQm9TuGW0h9Ajf+CFNi/M4yZPtwWj/Dqq+bsbp6aDQAwjIwDlmYF9LK\nUhGQiybQvg2NSSMeOLDohMr62LQW2iLWNQc0TzBgiEHaGYIXNr364YPI54ZC\n6CAfnQbl476rXA/syxz2tfVQafFfIUEtH6G+qvahbtG1UKg1wvhwD6uXZEqj\n654U61cfbyMrmhxRH2N95CzWkcNwc+3ZyJp2g3NVtI4e0s5bpdbirJxzXoi0\nV1tHSSI2/Fb1ItM1ObgBwcJu27w8Ra3EliXPD2U7q0Xybod5Z/Gdxeji9DKL\nsmzxXI8+a/M4GdFIlut/12bfk+q5IHGZpYYX+Tv9nHShGBCx4JY32wtBqVuQ\n+Syj\r\n=wUc4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNvGfbU5DYOKpNevEODCzGU4PYmXEe2DjDmP2oDinHSQIgMVKb+IKalBettjF1uQmW8leqCX20tcN/GWthuC0YqLc="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.55_1583931456511_0.955919139777381"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.49":{"name":"ipfs-http-client","version":"42.0.1-rc.49","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/add/form-data.js":"./src/add/form-data.browser.js","./src/lib/buffer-to-form-data.js":"./src/lib/buffer-to-form-data.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-utils":"^0.7.3-rc.49+bfba767","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.6","it-tar":"^1.2.1","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.3.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.49+bfba767","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"bfba76748b8aabc0d66768009ff6f4adb24ff439","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.49","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-hpNOe1Vq0cIAC5eExhTyTfooJyBaBFI3ZcwvWojsxNkydx7Edhaa7dzO0qxElD+aL16BZiTbtqTzs47hL4P4pA==","shasum":"988e3c001e7d6e530989fe5379ded5c5cb46881a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.49.tgz","fileCount":132,"unpackedSize":185606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea+VACRA9TVsSAnZWagAA6GgP/inmJXE4WN/EU8+dtaYZ\nw6jR/AFmEBrjY30h+UePhqGcgKmd7pi1Wgm7e9oxGEkjXHSYkQVY/RsySUOl\n9poqOOPRx9rNRCqi0S5/n7aQv8VInKbfxueNUALyUOrVBAYcdL/XuEsECvnI\ntRYXfKhBbixBdGrKEiX1gqZpI1yCuQbndGH8FGVibaiaBP5OErrYeHkYnGdX\nVrW2KLH5Kt+5gIYUFub3psj9iaubTJHi1TZkD5Xy+hXuTcqOp0GaceLc9Ikv\n0Qf/69L4+Wx2c32yTtywd5+QCuxyZIRp3jC9FpljsrpuEwpP0Oxk+b4DXY8V\nhedlsClF1ajxmtbGvzBCAzWX6xdc3PhncJxu0WZoEi2+mkHmNe+aUS5U5oeR\nXYResjkwQT9NaXsgP9hdIqkZbkS3CUDOTy9rCJbJD/mGiMXYoYCLuX373iG8\nxAGtlsPBL+d7lHo39YTjlCsFcNi744R53jKoyV69KpZSgwaqxxUJvz7Ecou9\nj8/xJhDbv1OBokM19ujAZDSY2Xu5p5jaI2NJQvpW5jq5CqL70FM3+ZR1Halv\nBZiYsf7lfq+kD6RGy5bRIIRY8GIWAfaROkRGg5NdrWboDop8JgP9qO5jHcXR\nRfcylZDjtkEGeDBT6uTiCd2Mq+HLjvhiskRzl6J/LErCX09cNAUAa07csk12\n7mGi\r\n=CSx0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDu0rKgr70vDDktiR38aK6pJM2J2dyl6TpITdDmzWaSPQIhAP9VwedZrgu6c58N8RnbfeO4s2Q1KPrykQF8taCR4y6Q"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.49_1584129344198_0.7981164710196582"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.5598":{"name":"ipfs-http-client","version":"42.0.1-rc.5598","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","leadMaintainer":"Alan Shaw <alan@tableflip.io>","main":"src/index.js","browser":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.0.0","ipfs-utils":"^1.0.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^2.1.11","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.3.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.0","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"a01f5b63cd92d225b10eff497f79caf4baab1973","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"http://ipn.io\"><img src=\"https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://ipfs.io/\"><img src=\"https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square\" /></a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://waffle.io/ipfs/js-ipfs\"><img src=\"https://img.shields.io/badge/pm-waffle-blue.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core\"><img src=\"https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg?style=flat-square\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs-http-client\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs-http-client\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the [interface-ipfs-core](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer\n\n[Alan Shaw](http://github.com/alanshaw).\n\n## Table of Contents\n\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Usage](#usage)\n  - [API](#api)\n    - [Files](#files)\n    - [Graph](#graph)\n    - [Network](#network)\n    - [Node Management](#node-management)\n    - [Additional Options](#additional-options)\n    - [Instance Utils](#instance-utils)\n    - [Static Types and Utils](#static-types-and-utils)\n      - [Glob source](#glob-source)\n      - [URL source](#url-source)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nWe support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available.\n\n#### Files\n\n- [Regular Files API](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md)\n  - [`ipfs.add(data, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#add)\n  - [`ipfs.cat(ipfsPath, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#cat)\n  - [`ipfs.get(ipfsPath, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#get)\n  - [`ipfs.ls(ipfsPath)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#ls)\n- [MFS (mutable file system) specific](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#mutable-file-system)\n  - [`ipfs.files.cp([from, to])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filescp)\n  - [`ipfs.files.flush([path])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesflush)\n  - [`ipfs.files.ls([path], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesls)\n  - [`ipfs.files.mkdir(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesmkdir)\n  - [`ipfs.files.mv([from, to])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesmv)\n  - [`ipfs.files.read(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesread)\n  - [`ipfs.files.rm(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesrm)\n  - [`ipfs.files.stat(path, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#filesstat)\n  - [`ipfs.files.write(path, content, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#fileswrite)\n  _Explore the Mutable File System through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/mutable-file-system/)._\n\n- [block](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md)\n  - [`ipfs.block.get(cid, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md#blockget)\n  - [`ipfs.block.put(block, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md#blockput)\n  - [`ipfs.block.stat(cid)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BLOCK.md#blockstat)\n\n- [refs](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REFS.md)\n  - [`ipfs.refs(ipfsPath, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REFS.md#refs)\n  - [`ipfs.refs.local()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REFS.md#refslocal)\n\n#### Graph\n\n- [dag](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md)\n  - [`ipfs.dag.get(cid, [path], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md#dagget)\n  - [`ipfs.dag.put(dagNode, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md#dagput)\n  - [`ipfs.dag.tree(cid, [path], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DAG.md#dagtree)\n  _Explore the DAG API through interactive coding challenges in our [ProtoSchool tutorial](https://proto.school/#/basics)._\n\n- [object](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md)\n  - [`ipfs.object.data(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectdata)\n  - [`ipfs.object.get(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectget)\n  - [`ipfs.object.links(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectlinks)\n  - [`ipfs.object.new([template])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectnew)\n  - [`ipfs.object.patch.addLink(multihash, DAGLink, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchaddlink)\n  - [`ipfs.object.patch.appendData(multihash, data, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchappenddata)\n  - [`ipfs.object.patch.rmLink(multihash, DAGLink, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchrmlink)\n  - [`ipfs.object.patch.setData(multihash, data, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectpatchsetdata)\n  - [`ipfs.object.put(obj, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectput)\n  - [`ipfs.object.stat(multihash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/OBJECT.md#objectstat)\n\n- [pin](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md)\n  - [`ipfs.pin.add(hash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md#pinadd)\n  - [`ipfs.pin.ls([hash], [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md#pinls)\n  - [`ipfs.pin.rm(hash, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PIN.md#pinrm)\n\n#### Network\n\n- [bootstrap](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md)\n  - [`ipfs.bootstrap.add(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md#bootstrapadd)\n  - [`ipfs.bootstrap.list()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md#bootstraplist)\n  - [`ipfs.bootstrap.rm(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BOOTSTRAP.md#bootstraprm)\n\n- [bitswap](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md)\n  - [`ipfs.bitswap.stat()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md#bitswapstat)\n  - [`ipfs.bitswap.wantlist([peerId])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md#bitswapwantlist)\n  - [`ipfs.bitswap.unwant(cid)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/BITSWAP.md#bitswapunwant)\n\n- [dht](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md)\n  - [`ipfs.dht.findPeer(peerId)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtfindpeer)\n  - [`ipfs.dht.findProvs(hash)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtfindprovs)\n  - [`ipfs.dht.get(key)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtget)\n  - [`ipfs.dht.provide(cid)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtprovide)\n  - [`ipfs.dht.put(key, value)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/DHT.md#dhtput)\n\n- [pubsub](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md)\n  - [`ipfs.pubsub.ls(topic)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubls)\n  - [`ipfs.pubsub.peers(topic)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubpeers)\n  - [`ipfs.pubsub.publish(topic, data)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubpublish)\n  - [`ipfs.pubsub.subscribe(topic, handler, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubsubscribe)\n  - [`ipfs.pubsub.unsubscribe(topic, handler)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/PUBSUB.md#pubsubunsubscribe)\n\n- [swarm](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md)\n  - [`ipfs.swarm.addrs()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmaddrs)\n  - [`ipfs.swarm.connect(addr)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmconnect)\n  - [`ipfs.swarm.disconnect(addr)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmdisconnect)\n  - [`ipfs.swarm.peers([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/SWARM.md#swarmpeers)\n\n- [name](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md)\n  - [`ipfs.name.publish(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepublish)\n  - [`ipfs.name.pubsub.cancel(arg)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepubsubcancel)\n  - [`ipfs.name.pubsub.state()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepubsubstate)\n  - [`ipfs.name.pubsub.subs()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#namepubsubsubs)\n  - [`ipfs.name.resolve(addr, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/NAME.md#nameresolve)\n\n#### Node Management\n\n- [miscellaneous operations](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md)\n  - [`ipfs.dns(domain)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#dns)\n  - [`ipfs.id()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#id)\n  - [`ipfs.ping(id, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#ping)\n  - [`ipfs.stop()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#stop). Alias to `ipfs.shutdown`.\n  - [`ipfs.version()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/MISCELLANEOUS.md#version)\n\n- [config](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md)\n  - [`ipfs.config.get([key])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configget)\n  - [`ipfs.config.replace(config)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configreplace)\n  - [`ipfs.config.set(key, value)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configset)\n  - [`ipfs.config.profiles.list()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configprofileslist)\n  - [`ipfs.config.profiles.apply(name, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/CONFIG.md#configprofilesapply)\n\n- [stats](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md)\n  - [`ipfs.stats.bitswap()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md#statsbitswap)\n  - [`ipfs.stats.bw([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md#statsbw)\n  - [`ipfs.stats.repo([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/STATS.md#statsrepo)\n\n- log\n  - `ipfs.log.level(subsystem, level, [options])`\n  - `ipfs.log.ls()`\n  - `ipfs.log.tail()`\n\n- [repo](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md)\n  - [`ipfs.repo.gc([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md#repogc)\n  - [`ipfs.repo.stat([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md#repostat)\n  - [`ipfs.repo.version()`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/REPO.md#repoversion)\n\n- [key](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md)\n  - [`ipfs.key.export(name, password)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyexport)\n  - [`ipfs.key.gen(name, [options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keygen)\n  - [`ipfs.key.import(name, pem, password)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyimport)\n  - [`ipfs.key.list([options])`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keylist)\n  - [`ipfs.key.rename(oldName, newName)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyrename)\n  - [`ipfs.key.rm(name)`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/KEY.md#keyrm)\n\n#### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n#### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n#### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n##### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n###### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n##### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n###### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n###### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.5598","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-snokHyf54/BEgVGYrheJnixfmh0gndx8SrqM3dmcwbvhpBIpgySxWmXCzgUF8sUTyMmGBCwSacf/oJH7GbZl+Q==","shasum":"16b55d7ef58ba518508f343d75aadcdd4a14aad9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.5598.tgz","fileCount":134,"unpackedSize":184939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefHi4CRA9TVsSAnZWagAArFsQAJLXSInMEPhOfDPTruYF\n4YE4C9pjYMYZyDLTLgaPsel/CnDzusXSMzeYYUST3yukf7a+uA/OTBrOOY2v\nMJv/CaIBRczorj1auCA1qev/D4zwmnHCW70ATIy2Jtr88pX2m3Pi5s6cjaYb\n4+9rzGc2L9Pkh0SDW+mq32VTObLaneXAg0dR3S3OM/CTDxO5g4v0NgCSyJnK\n1JPYwNyNuYTGyxMrF15F94ZCqH91aY8UouQXm/xWuRsBNdK7WrhbBHTGwLCK\nW2qdCY0WLO/RZOxKdEDcvkQxNvyW82QtfGSwNKhoDFcuNHgrX3RxntOckM+I\nELyM/p+lTjw+BascKX7g4lrgAujGqS9smsnA8xLWrAIt2YI5/TgjNtnx8C0A\nV6GvtMfNRS1cUP/gh7duugo9SFBYYZdbqy7DMssbNfjoglndquK9zqhwDQHl\nqf73U8MoIWKC37v68kRW8UQ0HmNwBJ/oZpR0MPIx+kJrD9fY8PUBM1NcCn0z\nwXkAluQilh1Rokp73sSNyPkssUt/MGehOzIENOhYpha3wsTECWYa6Sp+10jk\nmbxEd5aM6L5mKFyh7rKMV66okeN/0Syk635xtESRrwsaJYy8jHQh2IMQZ7km\n0CozW0zqmSlZBSxGDuqBREwCaoPzFywXU1DMnJGAZDFaUYL46eN3wQMGSRLp\nctFV\r\n=zxsx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDP1Hao+ycGb4A2Lv4vW6PwD5uflksSuQT5USkmBCPDuAiEA/AxrMNkw29T6ehwMBhWwk23gwfHISiK2UJ/avOIMsX4="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.5598_1585215672214_0.4474318990873958"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.5616":{"name":"ipfs-http-client","version":"42.0.1-rc.5616","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.7.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.0.0","ipfs-utils":"^1.0.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.6.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^2.1.11","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.3.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.5616+c2fe4ad3","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^11.7.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"c2fe4ad3b3b1da8e49dda84fd0c1927d87bad7dc","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs-beta.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.5616","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-h/5X9MzrBkcrSLu+9GtD3A9Wr8Z/jXxfOqwtUX+I5nW71SVnhaIifb//+cLwcYvEOX9+k5RDOF5LPtTA2E4amw==","shasum":"6d5a282dd5e63d14287fe79fdc663515f4bd60fd","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.5616.tgz","fileCount":139,"unpackedSize":3381227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeflsdCRA9TVsSAnZWagAAscIP/3q0GIPdC/G46VN+Rx9+\nyep+sd56Jjg64uegd6lRkmdJ8szjMonhv6MN5l3dSaoXCDLvDE3kO0gtOMqC\nY6zT3R0osvo6I8szJTrx2wHQo4tLeZ3cbIdtgHbARIGoRpsxfVlZs860qLNO\ncSXyFhjoZYP9N765xErsgiqhsn5aadjkvvFNY2KKxg5Uqxp39FXtWdIVIOeO\n3vkUidNKv+03/zyqPfDcPbX2IKCil8p20Ra691IOM7NKSeZ/k+yrnxMFzdRa\ne3fpSA0yoocY2JivQNGtXV7JKeNSmccTH8Pz4gLPtFDCEezY/ZntJw3Yrejv\nQ7DYfShf53OZTOXoLFWd00tBtzko477ep1RQFkUAe3MzIwWBMokRFpkyPgQD\nNRpXiN73JgyOqvgeT6CB5pLXm/KAf0iH6KluvB19HI221ea4DxGse9FYP0q5\nzj76NhLk1hR+flD7AznO9W2PXuBnZNjRu9d2t2ACadf1sJGf+ptmv4XAaOCn\nEdSFO6AAD1rxoET82bq8fSJ6v3Rha3Md3xVynoDIxBY33bI8NjKi3hVCMA5r\n+M7F+rL1DQ7hA03aVykmQszIUBEN8NbJ0HIBzu4O0wIfoykSZLsgudrMuDkp\nvKxI2UIN7/bFcdEthBL9hToP5DBagM7V7VkKgpl+8bLKIXWR8cyEc3Zlf8n+\nkO4H\r\n=pNvA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQ8wbrlAZRKwctDjY5vmOM0+LathnYZeT71JfcA3iQLAiEA1B5OiMTvoVv/RWf2FZHrscVsOiB8AUolMPRg+L5gWZ4="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.5616_1585339164895_0.8195980393186111"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"42.0.1-rc.5619":{"name":"ipfs-http-client","version":"42.0.1-rc.5619","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.0.1-rc.5619+b9694a74","ipfs-utils":"^1.0.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.132.1-rc.5619+b9694a74","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"b9694a7455e9b68d956417802e8f71fdae16f51f","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs-beta.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@42.0.1-rc.5619","_nodeVersion":"10.19.0","_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","dist":{"integrity":"sha512-4DcLu5kuBJGz3i5GKWqWTiJNdte0gJ3veLIH7BJXQ/+nyafcdh8J/WkKtvRfscPlucPqB4jq+1wweNmHpCvQWA==","shasum":"d78bca04ecde664d3b5cea61ae4b570da9ec01d4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-42.0.1-rc.5619.tgz","fileCount":139,"unpackedSize":5819241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegiDWCRA9TVsSAnZWagAA8i4P/3CgPlOK7fxGLASSJVbS\nfFFPazD/s/e9Dy63FT7K5IKmNSyElAxuL0WlgeRuMSCRN/feXJrdgvuvkJWV\n0WUza5h6TYV+VJQv5cOMmQFx5JfnwIgmdwhrIfH8+1tPAghrBVBXtipeZGTf\ncCpddGL8tjHVm6xQ6cfbdMMzPBpkuGsGcW44n0mdfqrTGoXWcaRMla+cLhnA\nHLdNmTeskeRfSehg811vmrj74dde/RL+qb/SwdYMeOxgjnqwQMsxstii61V6\nkJTh18HYEZMmg4kpnulzIbOa/zG6wb+qbgtJ121v4xfhj5wo3ZOA3CFKFvT6\nQ5CMx4Wlvl0BhY2xgnpI7eS4lZGTAXwm9wxGH8N9oE9k6OnrH9Hs8YUgDsHF\nCnsqxpKctvPIpo78DQYSvtDytMgOswvcqAOhBJ/niXoGmxVNdIhiSMrS+QVK\nUwoCupWbw9uGmUQUYkYSzklDv62x9PqmmiQ5LzyyuDDVu8m2HZfyEm6tYLkY\nviNybAjn8mPqIlX8IVKmrHeDbX97M7HxaEHqZg5b0MQ+WHFbKuPTia4TtUQd\nlpBTntHlciyj5NIiTFrNO5RzovkJ6wNgLPQiWvj1ltiCDm6PyH2P76LO123O\nA7QZ4m4b265Xa5skQFPuoMiTkjrwcFWogL6p0NE5yVV3VPgOic9ocaCi+8g5\n5SN7\r\n=Kwzz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0BBnbz0mUAKnZEENGYcJd4/4xGxLYOArd7aof1nDYFgIgLiwbPaPFaYvHiPOo8bAdwr01JhfR//gJQxEGkvkMORA="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_42.0.1-rc.5619_1585586390078_0.8921420638916073"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"43.0.0":{"name":"ipfs-http-client","version":"43.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.0.1","ipfs-utils":"^1.0.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.133.0","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"7f2872bc6fbacc603af38d860f098defefcfd1eb","_id":"ipfs-http-client@43.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.1","dist":{"integrity":"sha512-ZuL9MJDZX0oZij31igN/VZDID8KIfR8rkSFoQqkyU/vHvrALskvZI0Cy2MqdZWeCMIIp7beDesYPqbYuyWjVkw==","shasum":"1c7904ee764d244ede9765ac066bbe36695284bc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-43.0.0.tgz","fileCount":139,"unpackedSize":5833310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegxBMCRA9TVsSAnZWagAAWRAP/RjJuNJPeoM+uI2ASUjN\nhGsLFP5vGnvgje6xF/3Et1zhSy0qa+QCuKrsHFvMBiQQQE6BijO/u9b+Doq/\noYLvbA2QN+kqnBh8CWJYiV5woIKO4ZdItTgVD57HkJhm4gpCSjtvxIQHCPKf\nQId8p23KICmgjd07SvwGPzWDKBq7jcvxzv+a7v9GlZr3SxXCiHyczkFoumq7\ncnZwJKlxO/ohuFGl8hnEEnSTJbxrxOku/J+MXNrCUQaZfeZudMi0RERLAK9b\nujwUdxZ+I2YVVJvmKgx1EyWblWw1gKp0Q2C4Di/NeE3AfQaWqXvj3zwFHe+F\nH/gCiPtmRZ9M4RdX12Bv2YEAcYfHnR5AdpAJjBfIvLvrN9168rGzdV+dd+MD\nMry3rX/ESnIz6eLdFO7EYCWhEOkDs0erapxJRF6eF0RknHloNEZk71XwpasU\nGAY26Vd9Dmvga60lYNKCn1YA78NwLrLZZBfuI0oKo+xtVZGAua/wtZljGJm/\n7NUamaPmEnp+oWt20ilAwJ1O/2lrxpRiUrHS0zcsDdiCSaCxauSut81974d/\n+1LXQZtDEPYVTX8s4SgB8nZijSaz+opaav/ytDHCIEREt2bqr5IN+sK7fqYn\nh836/8jD5+Tz4BHvWZnShhD4Ff+g4aWV70tV8P+TbuyDSl5aD8n/TSCfP7/W\nUZO4\r\n=z3ak\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3OQ2NVW+d8lPRA4HP8bV5KSz52nKrWqm+3o3LBiqFYAiA/boN4ILWgCmVETkGdsKEMP4k0gQTOyn/tFAa3C6ND9Q=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_43.0.0_1585647692168_0.6990674055131623"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"43.0.1":{"name":"ipfs-http-client","version":"43.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.1.1","ipfs-utils":"^1.2.4","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.133.1","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"d05793ac5a823d5b83056198e4eb34e3d75489d5","_id":"ipfs-http-client@43.0.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Z/fvb94zaubgyxXWuMxjQfDm4DUbVGR81QOawNOicjzcdbgeg74iwjgGzN19bGAwlkqQGkHxoZWswdp4TlMeRQ==","shasum":"d0dd7ab807b6efdf27239acc5b191d0a51c9e7fa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-43.0.1.tgz","fileCount":139,"unpackedSize":5837620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejgaCCRA9TVsSAnZWagAAlmQP/jZRzY4Wv8FbxnN6ar7m\n9GQrTs6P45SijfRzGp3V0o5ZL4Zy+kh4AtnBmBq0WRWWH7FldARRXdMlczOC\nUbebeEFYPzlk2siH+/wIXeJbTXeOUd8uw2JhMS1kdqavPjWKe5Ybgfhrgihz\nI2KOialBkQAZY/Tk6gVcIoncRpigLzNtYIwc/r4PfVZAx3gPiFeS5cYjXMW2\nhJ4Orw2RoZ/o3b2uSifR+H5ulEPhQ8922z+kuX1bAggJ9HIUrGBhQAIWvnXr\n04ZTCB/pCiHROn+sJ0vhxDSRqoqDU4wx8kSl/WzGpbKRIg85DruDS/QLZsXM\nfkwXPFLrOkYZJqwrXvIt9GyqVChXMg4lUfwfeV/iMoq+dCErNlnKs5NaST2f\nHYfgZQJKd+vhZFybHhzuZ964rYYwAz9ETNm8RbMnsFGU5isBQvbCTQyAhEOQ\nTL6+uBk79SOBh1/TdlDIfTv2caU75Dmav2ELb7Jg2rBcW8tDL+aUzTmxJHER\nXAshrTMeFCJLwDvDFuwSH77Qo9nMc7Pu4CDljB2DE8SpXk6BDqyYwnh24Icf\nqqjCziuHJwe8wSJDsgUyNUakD2UVtJXS7KZgCjme09pCz+coeM1Hzp/z8TpF\noILXBSVIPoPERnq5/5kP8WmSyTTCVRCPHgXAMyo+mAICrc/IlxFliHmqUz/0\n3cv1\r\n=spkh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJYnLK2+5KV3kJHys21OTyj+Pqc26WH9rct8oxXrZvIAiEAo4rf9DMyAtyeWlHLW6po310H8XoE/qEJrOkByUlxTK8="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_43.0.1_1586366079614_0.23498321369786557"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"43.0.2-rc.4":{"name":"ipfs-http-client","version":"43.0.2-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.1.2-rc.4+943d4a8c","ipfs-utils":"github:ipfs/js-ipfs-utils#fix/add-iterator-method-to-response","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.133.2-rc.4+943d4a8c","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"943d4a8cf2d4c4ff5ecd4814c59cb0aae0cfa1fd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs-beta.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@43.0.2-rc.4","_nodeVersion":"10.20.0","_npmVersion":"lerna/3.20.2/node@v10.20.0+x64 (linux)","dist":{"integrity":"sha512-kVN6/q5JRp0mMAUob2hKEoweV+PEuRGFocj3kbIBokimzfNoyyb8UGPuM7zq+kXDL0cXsteUPjxtMB827K/4nQ==","shasum":"1545e0f54a189670fd3ab9506c18eb956e53a42c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-43.0.2-rc.4.tgz","fileCount":139,"unpackedSize":5843761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekKUACRA9TVsSAnZWagAALt4P/i14yJ2WHOUpc4fIzVLt\nRBZKtRYZTJYD+HM1jYl7CuD4wyzmRudWN9zLWpynxLgX8ZssFh2/CnWvksTv\n0rvIQKpI23p4i05eWI9TzfcKAdIZ73lmTwhzd4vo5iJxRd9GsfNz12qXOpP0\nh6+DXnLcnEHh393eXuGAsIvJy5SgCTpXW6qNSyiWtnoJyIPO4IuvKdRK6zb3\nh/iuX0MCIgS6i6f+MSVa/rqsoVaScASJo7myImmuO71IfWGSIzhTClHRsgEz\ny019iS2YZf1HcVdzZ0g9qqzrxnt5JsvId6n1kT4uerVqTpzI0TaTVzJ8S2rq\nABTdJQYgyZLeoKv1RHOJtBuMt8nHeDqCbztzH49Cdof0Gy9EU1iYcjOMjQUK\nf01cmPQQCsNQAlE/f1I9uGSrYXfDijV0Fl+pcP8oQODiVQtReLQN1Jc9enoH\nHc4dSfVM5XGsNovF+XaK7v1zjqMzAszOTV97Vi1NbsiDizg7xFd1RSuV0B5O\nyEvEr8ZcPvO1nBJTbBHYV7HDFIuMrqL7kymIziFCZc8gwv22yxhRHO7C83qX\nNy3I+2yRLsHNZfQtYvAjCopbDtHTwsJzMiH/gEu5x/WUet1jBiNzC6LLFOcc\nGhSvqlSCNqxzgvdssaFV6XUis2MooE+oXcCyy0JnYtpiyRj1Kry+Tku+I20m\njjkk\r\n=sZIm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ31FzZN6o9XMDWPEeo+qrfH5zEbKfvKRUffS75X853wIhALjITmeIecwNuU0L7N6HucrGfgVHdLmtN7WY16okU0rG"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_43.0.2-rc.4_1586537727471_0.4232237899234317"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"43.0.2-rc.5":{"name":"ipfs-http-client","version":"43.0.2-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.1.2-rc.5+6d98c924","ipfs-utils":"^2.2.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.133.2-rc.5+6d98c924","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"6d98c9248e35514ba29bca5bd92df7fece950030","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs-beta.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `signal` - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that can be used to abort the request on demand.\n* `timeout` - A number or string specifying a timeout for the request. If the timeout is reached before data is received a [`TimeoutError`](https://github.com/sindresorhus/ky/blob/2f37c3f999efb36db9108893b8b3d4b3a7f5ec45/index.js#L127-L132) is thrown. If a number is specified it is interpreted as milliseconds, if a string is passed, it is intepreted according to [`parse-duration`](https://www.npmjs.com/package/parse-duration). Note that this option can also be [configured globally](#global-timeouts) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@43.0.2-rc.5","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.20.2/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-9jjOPZUIFmeukpW4ZUMksLLQ3JLOwNBuFYyrocoHen1c6yd5VdczRMTr4tWZA/lY1Nn5KQm5rikJP9OSWklKcw==","shasum":"844c49642fcd5de1c52b1e6cb291aa035f055fb3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-43.0.2-rc.5.tgz","fileCount":139,"unpackedSize":5845139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelgnGCRA9TVsSAnZWagAApkcQAIqVy2M5pf1L2BnCWtPs\nhgWXqcoRlGMn10jIz4CNjUJ3Eteln6MU7lXtkLEg2aI1m32XDM1N7UC8FQmg\nTHoMF/ArJ7MQEugAkO+cq7vpzDARTtLLYu3sd2bnQDHbVdAyEIQHmpWrY0E+\njxNf7jcwQDhwbEpK3IjOuqJ+EY5qt40WGXI02jcwPtDdee04yGv1WNMfYOZa\nLMSJJt7864JDGl9ORt9Gh2TUhJ41CJKkijmmDCeiQUVg1ZkmgMi1KFE+lThV\nHHGEg12YoAF8IQ8Ycx+OmdcVoX8wGPLrlAFlOAd9g62L8rYqSxai4Zg9P4qh\nT8yZO58/G/wkZpbGY2+lpgnwnbvLaOO7X4xNt0C5DgPcN1BuMiDlZw2weC+j\ngjVNp3WdijKr2cvcfITjBr0GRLwdItdgvGtzCXJowdqCA2eD9M3kmsEFflIY\nuA32i+QNYW+MUfF5b3AzoIkHBPYdSJlFYTUqTDkkFttBsWElTcBftCZW5+CN\nqaVJsBZMOYLlxDb5ub+vqY13E181GcAdcQnBcvyFIyS/kkFGTYBjKFI/3E/O\njGQ4YdkOKdVQe33TkI28zGIbpmMTLguNQS2yyPss1zcMoUB9RNvGucO/Ypzl\n77Ix615/kz94fLe2hsFMEsqCK7dFgCFckMFGV7MjmA7ja+UzQ5ZRx9sM6gvZ\nmnuw\r\n=gBdT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID7Vp1SnKpPBFiIQpYmnaHUWCSPrEaWDp4gww/I/Xy1hAiEA8s6YLlN9hrzaND0dWTFKL/C0ZtGkwqIYbcCMwfOibxg="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_43.0.2-rc.5_1586891205634_0.16517560394264308"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.0.0":{"name":"ipfs-http-client","version":"44.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.2.0","ipfs-utils":"^2.2.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.134.0","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"dc1693acadf8a550bee2a5ac69c21180d3a9bfb7","_id":"ipfs-http-client@44.0.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-vFGM8eKipeJ7MEgare9zXVJqQ37pLUdNP4fpIvfzDfEgpK6OmJR3UaoZ1RtKwKGnHi/ADU3Dc5rGWd/YwiaR9g==","shasum":"3c0577ec4b3b87fec0b92acda6b17ddbb7207b74","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.0.0.tgz","fileCount":139,"unpackedSize":5987053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemFoMCRA9TVsSAnZWagAAFL0QAIhtdBLS4FZWtU5z2WjC\nPavZxKhDEsvTbl9pVe1wsUmIQoNP7GO3nKaEb1Nv+pGxnOvOKib6YwKDPeWT\ny6nPh5jU2Mc2WYf7ig4XINrOlnpxs0JTdVQdqB9SuF5f8NGCrBeN2WhfdhaX\nBMuuLoYmavOE9wQGoJEkfh18GytqwY9Cdfpw0E80hEh1mS2EWjH9PznZp0N4\nUgayX5zdt0FoWfZ+qyivA1TqacwlrQIu62lcRwwT3Wnh+P+Kc8FzhSpAm6Qv\nnQLtSlreaCrTgaKyTRh9chhBJICJI85xgPtDT4T5k5pUUYY7f7IOltT2Rj04\njeDY25u47sIIBrISvR7fRw8GJPZJVk7eR69UaAdudjkBGBdlwVGqF6pkHJV/\n/0GujNx6CfiXtq5izcYN9+VOlTQq4oJjDHVF7m0xHYsTnhtCpV/iuaL9Ue4M\n5QjPxJ09OUAhFqqRN4QZPSVKEM302cFGJlOM9CZaDSsXgHIeUl8Ke54XNsBo\neS3FUUNXa0iQIDf6mfqEAMSNHVfNzqTXZ2Pf97zRhQGj0y15iPOKgyjGjcxE\n+xZM12kAe6AE0r2ih+W+k2gCRLlRWNu/PpBAU0c/2gg0q7h2n5jqgunh7TiV\nTQXYhPDWn9WJeB5THEhffaI6jxk5JP8UENM02uaJh29Wp47Z4qdRWtb2RtzJ\nhsgv\r\n=ozsK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDn3eVTJLMLDVs5hxNdQJ9nooOWw44oPIqLt1dWMDJqFgIgMIHZ/KnMapGce4giL05Ez+hJqoqmCBieC7Z+h+fwMjs="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.0.0_1587042827835_0.5113594951402454"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.0.1":{"name":"ipfs-http-client","version":"44.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.2.0","ipfs-utils":"^2.2.0","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"21.4.5","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.134.1","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"c16b5b4563a38438f656d53f0c57584508dea39d","_id":"ipfs-http-client@44.0.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-+QG9RdfB+tatxLoZCohVslDrFpmVK622fWbWwRPo5tQE/5ZAvXXxasgWuc1M3BvXkSIDvhFqf6lIdNawRfuMhA==","shasum":"6d09d82612c194ac876d9aad3a0e4c5d6552b4d4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.0.1.tgz","fileCount":138,"unpackedSize":2243416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqCb1CRA9TVsSAnZWagAAS5IP/RwrjMhittulM4u9p6EY\nwY3XX/pmTY8sB32XmOuFLeuhgORgJGkITD1t8NEToCdhNcgZuhrizeZEZ9C4\n+jbHjwsKD2ll/JRYcwi5PzMd7ud19D+ljYsVqerKdV0pAmnl857e16UJX8jh\nqQ+wqktY78ttJfYl+7ykxOWfNIqgDqmkzpf6C8PMijCPHKPZDKVrrql8LlJL\nUEHJjfCQMQnqaMzJP8j3IxB28y34uPZZTjuMXMjlIl3/f8pur3NyyatlmT7f\nK0jHgHdfYwMEfi9OTDC/rOAj1s+JOzIzRoENUft7xWbvzjcHnjdTCj+/Pmne\nJTaUPS0ZA3U6ItgadztHdxpCKqHBpeh2JkaxgqaowzizUKwfTTMZD4ksBiWV\nihiDsYNa5sd4W3pq9LnfnDdesP4xXj+e8lWfY9I5c8IGUVqwIZJe/PpV6ft6\nA79Qghnu9363KCEcg2MZYJ+Pwj7aS8hZgRMI5povW/Z/WpzR5LJxfHvhXb+4\n62xmB5vqm3xGVQLwDC0KIBtzlTBONwSjNxboUBl1y0yTsH3YL8pcEUkbZAbg\n5KrjLPf1vDuT4kU80OkxtJxAkQvTSDEMB55PvNElHEtCBDTa9ZJTsFlHNigS\n1DStUdd3hRfyQwNG4tDvTcutGMXwzpXzIM2dJqMbN9TnBuW1vSYtRMVM42yS\nbJz4\r\n=QTsp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGODCfqRoOATwMtE1lg8eQhGuSA4Dnvwtdmu2mTMspZ3AiEAgwchCgzionXUQQy8/LMio9xW2LberJHRzeDp+L+YTms="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.0.1_1588078325052_0.5693763613358973"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.0.2":{"name":"ipfs-http-client","version":"44.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.2.1","ipfs-utils":"^2.2.2","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.10.0","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.134.2","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"e4620af7d3ae1180e94f272ca9f9dc546d17f986","_id":"ipfs-http-client@44.0.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-jKhLYt8KsMYFvuet7u1ialYOkuDBX0HYxM4310L5ej12KsQ1HEkZUVZeis3bVt2orMDc9Dhrqht2gvsnWW/bnQ==","shasum":"55a7d056b1e0e9aca24072001a7e99b0a0be31aa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.0.2.tgz","fileCount":140,"unpackedSize":9204203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesY2yCRA9TVsSAnZWagAACHQQAIjS2nb4uiZRcMXaCThy\ncd9rlwAbEIIUWIs1KBrde4Ksv83OClnVBnYpFnynAFUlqsv4FjvR6QJdfb04\nQgecAUETWlFredLqO6BYYUUrLE2WBPCfaVbJNag+AZZJgCu/AKiz/Tdxo1jz\np8FwwJ6GQteferfprkbVcVRcWMGYpsVMdh6noCYme1jW2OyDZuwnYpomAv0e\nyVJlc7WFmCXrMMRhf0MD5iZRsQfb5n415jZgEAS0bxx8NdDGmlC2qMKm9Wyr\nurWFMrNFABNou35d2WoX49lTQ15Ec0ygz7Y6sBEoFKz5ut+xGYzh/oJBg+1r\nDdqsNleHXjkeYmdOH0QlTES61/mK1HXITxj/6hO0GS72P0MOYpdwZ+m0bjRi\nzrcE+3C5LXLqKKhpdSqeLS0yLNxIFROGgr2PsKejTB8V+fVqEnjhkPgF0SuO\npV9NRaenY6Qbg9TxXPUJoFOl9Cqatn3Wpl2yY7GxV3N+g55n69a5xsNHemxa\nDUV7ccQkw3F1AM4WmclND0w8qd0J43DYw7P9oXHuVNR2EymcwRzUONMYwhK/\ndQetdSF4kRSP5wORbsYhPOUYt9I2BL0+Kn/h9az3yTVrc//VT2kpX4YNX1Mf\nkC6sUQmCEYxYX/AqvI4z6/L7klMMI0UWiN1gVJ3iVjZhOgiYZf+euzZYmOxt\n/3wp\r\n=Tk81\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLk31XGutC2xxH/dRtqUuGjetdCoI2gF5xc8GZH0KEmgIhANIRQx5NDgPMlRYOa4DNHbtIeWx6Yo6wUqhbyao38Eou"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.0.2_1588694450186_0.8481799793996361"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.0.3":{"name":"ipfs-http-client","version":"44.0.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","bignumber.js":"^9.0.0","bs58":"^4.0.1","buffer":"^5.4.2","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-block":"^0.8.1","ipfs-core-utils":"^0.2.2","ipfs-utils":"^2.2.2","ipld-dag-cbor":"^0.15.1","ipld-dag-pb":"^0.18.3","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.1","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.2.1","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.14","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^21.10.1","browser-process-platform":"^0.1.1","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.134.3","ipfsd-ctl":"^3.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"34611213384585ed3ff62fde05d25607ea89cf1e","_id":"ipfs-http-client@44.0.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-uO/UkMryuKMqIzNkyWv056RpGZZX7UPGwIE49Y0ZAAqAmm08pxIiC1B93NP4jBefW/aNFjazcyhAewMqg1YeNw==","shasum":"7743e7faf0ea6b402dd441be3ab97ecc448fbae1","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.0.3.tgz","fileCount":138,"unpackedSize":3294821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesbLxCRA9TVsSAnZWagAAmnAP/1shDaK8Py4PYagGe3cB\noGCLER+MoYb2Pk28GzxgvdBzEGIA9uB0bPyJ7BLxzqxUWcuOKmw3rSv5eghJ\nWDIbtN/BOjQNH5e8HdjkGSHPsaZ4sVoriYeXOsfzc+2/2gh4mpME6iidWfot\nSbeUKXbdkYSKHYZGuOec3jxGWluadWeQ5p+ZhPVIQbxb8hag/opHDWXoDh72\ny7N2U9450XdFeUkHmqlH5x+oc9IQl0i7DsLGfI33xY0eawYq+m9IgHsfVygl\nenl6my+09F56RFfoox1tqvun2tT0o0QUoTwMmx/xvby2CjGqNriBIRoDFj5X\nrtxw1GJH8Clb41keoRR+KbNwKYxEAIJlnd+h247yQjoUDTlsyLvZyUTg62DG\nVVxh89WlgHuXkoGejUlygZILWEecfHLtP7CjAHQz2S0fIjE2Pk8m4cgilrwY\nvCquMF3te1XH11fHN58gyCcXOLj05kVO4K+G3yZHY8Z8GLu2CCClYTnDQ+kb\n1E4YtR3xKy/XEkiBhLUVBI4GRe6k+6z9Yw6p6HRCgoBG3IYpYWxzfvXmC8V4\nNq4wLjNQ3tTsJWDnHAq7D1qR/Qn0vPLKppUwiTEsD9RlW/1JWJKxD2LmjJeN\ngQWiwWXWYizr110ez92fOqj2105PC+6dAWq6L7i4o9KIeyb9/OYXAu31vRZN\nk2BF\r\n=je0F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqQ/fNXHHqRFzt1AqIrpV7g+E7wjDp4ftK3IxwUjyNeAiEA92hc/eCOSSh5L9NtNIqhMraFQqb83zv8pKp6aQ4P9yE="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.0.3_1588703984596_0.5901696135814622"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.0.4-rc.3":{"name":"ipfs-http-client","version":"44.0.4-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3-rc.3+2b24f590","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.134.4-rc.3+2b24f590","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"2b24f590041a0df9da87b75ae2344232fe22fe3a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs-beta.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n\n<!-- loading the human-readable (not minified) version jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.0.4-rc.3","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.21.0/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-YYrgrJLlfghSbu6baIoyHc+LXL3/uLQBlwPGn+jzlzdCm4fg3IA8s6tP/WaZ/DcfnfL2AeX8VTXIn7/WEYJHmw==","shasum":"657850fb44a347c13762bdd86810772ad89156fb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.0.4-rc.3.tgz","fileCount":137,"unpackedSize":551050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevTazCRA9TVsSAnZWagAArxgP/3wm/dzcmqT5iYJAz62Q\n9ZG7sevRi5m7CYFq9zEQOM4D24eaLJrkApRCtRM3GMlPDSBxcFBkhHh8vvQE\nK5pE0CQr9ev08aibmTxn0YYFqqMUdhrH6LwI2vlB1XN80fI1E3Ywx36X+JaW\nfyT2Ar/3IBToi5o74mZ4Zh2Yu5c6Ic+J2x9bRRuSgzIifGs3WoJxZCE9Pi/m\nudcTJ231zvVlRmu8pbMIc5gZxp36xgijaar+AHk+edP4pX+KOuM3c7w61uzK\n7j1QItx+Z5Rgw5ox6pc1/P5p26cLC1caKcPlyBuofjjL6E3qTikO5TVYErKE\ncxhjFMv86i+2JO34ZHFVusD9PZgoH/ZatSL/UhYvCi9yY4iYslUoJH8E86Py\nNLtuIzbxOZM+H6gX4tPCuvMZBNS5mV53N7o6VHj5TfvVfcxQ9yOr96rhot35\nKfxRgfTsN0KtxUb8KuOaFsYz7qlOy7IIOPpelMUIBqULHAmPt9gz/X4qRYkN\nGGJoSJj2kxcvJKby5kFrQfINCfRWgjE+JBcOiezEo9aXilAY2jSOQa3MjGuy\nFiPHkajWotXPpGBepqzCX/faRWqLcnSj0PBKBgSg8GY4//OyVLRuf/VI50fH\nW+2wfeu/pwPUvn6u43E8h4se8iv+nrocNdtXYRt/DspdNBnq6xFtq+HL63Nj\nPh/n\r\n=Tg8a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEFNORGZH3MnLRClJi6KVLZ3Lzg+iO2mJhaco1h43nVPAiBo+NV7ykNZqyZ7dbMrKqW2o1167kWz+FP/Itsf5fDozw=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.0.4-rc.3_1589458610815_0.44239750676710954"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.1.0":{"name":"ipfs-http-client","version":"44.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.135.0","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"badc185203b243eeeeda5d8bcbf363ec52be93b1","_id":"ipfs-http-client@44.1.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-1zgBMPLI7Heomj14xxeY96kwDQDOarRMBIbik/YAnIrFcgIiBxRHtJr2FytQuLjZqwmeqT4rSUqfKLXaWcMLwA==","shasum":"d74ccd691ce3d5ce87ee65826ac65fc3715537e0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.1.0.tgz","fileCount":137,"unpackedSize":552050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewldLCRA9TVsSAnZWagAAe30P/ip7cCO7rlQr8cFlgJ48\nNF3ubwn7nU1NNosqx3CCbCCQSjEPiH2NSGusKwaxzXuW43+YMs6NAMKv2d5L\nmhnJv80mcAuJMYDYQZipv6rOZg7Ph5dEEsnSSElksffhPeTsEVw1QW8hsKvH\nKK+vLcxxbqzts57cc3cJx7qRIpi54VDDE0WM8G1Ar5H4I9ObINaIF5OdmP/A\nqK+ZuwobcTx4qTA+TkDZ+V/MScNZhtF4JT875qN9RBtH/T+mfBNWKrpNW2wY\nR+z2VAWtRV901Bkz9GFqoEZuQwb7kEIIIDYF1K6uPTopp9H1vKEeEXNYB/Ld\njbcdtCtAggQvPTFeH6tQXSuiZqKuKtPhmysz2TfhgEA7B4+TX5GSkEJhxnf3\nRq7BqEA+s1VNVjBZ30G/XE2eIF+hmIfIvVX3ehojidBLrEkXnRbyStkI6Y8M\nVj2cn/JyJwXUM9ZHPfQklx5KWjYIHu1BNI3G7m1p8XqispmxLwi8wu3TBrPQ\nXq+2BUU24OaZB2gNTd78xcanYREx5gWeJ3e3YOCVgNEjbUE75BjPkUmtmjq4\nph/RSrfo0ap/2YLapCoB74+WwLk7Wn4MktGuQAFo6UfJp1x3BbWO+jiURXVq\nGmBxCZfTDG4jVjyrHAi/q3liMgHTSFKGc3CPaSttZvgYBgoktoIatZSbXpLU\nTDVV\r\n=na2H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUhydqcl5Zka5rbYx88g3Oil759vmPYTL44eBkSzIhyAiAzNGe1dWsA+Ec3xhi8Ou7GvXrVyfkF/S45jYpvXLzueQ=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.1.0_1589794634858_0.9742749741732089"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.1.1-rc.7":{"name":"ipfs-http-client","version":"44.1.1-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.135.1-rc.7+115948d8","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"115948d81811d7c7b5ede7be4b175cdf65c7ff91","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs-beta.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.1.1-rc.7","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.22.0/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-yKdppYm+JEB/p8CcXlQAVRLw7TjLveMteQM5lZRmp2HsoFFofEWOAqfj8UvqFKt01zk6lecs2yJIDHwHqdJTeg==","shasum":"71725b15638cb51ed5731e837b97c9b834ea85d6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.1.1-rc.7.tgz","fileCount":137,"unpackedSize":552120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezsSGCRA9TVsSAnZWagAAHzYP/0CREulpL/GM2ZXn+Ywp\nPShQN5wnsIjvosS4xnue6YBVIbb4fZZ/AD6QWZgL5ovoFwU6FV5n0MAneMu5\n4GTZetSI3yIllLM99ASgC3jQTFCW+PlAAvFDt0UQzeCcij0rCX5UDROV36RN\nggHpk7x+qzgVjHqv00smur4CKZY3XitInLUJkLjIBRwx2I9hj9yQDqr8qM2Z\nkRlTO+ej5mv1HlUOlLMcjLE9X0Vud8yzgPGUwJJHD6e5a4lDhwCQjiTK0c37\nXUemmsHmwSuFcJpXTgbSafAsdnaMhwPj7g4R3+pwN17LShkkvP0bLd59xopk\nQ7tBfckX2k0Jg8O8plqQLq/RgUC5/maDiD20ipkyDwwyQGQ+VEjuSQrGwTa1\nW85XiiYWBX51FAS8kgg4YQea/5lCwKYRkyA31LiXq93I00XlIsk40qLr7om/\nIzsH5+oKKzAZ0GoNlGzhTVpSYeyi/5FL9OckFkOn4AQ0+QTV/wQJqHtIpEsW\nExyRFD1dIzKvNGiegkiFShC/ONMTtwkKoC1NPLxYOBNBi67DWTFSjUgkQlkj\nu9jVQ5hWn6IfYE+xRuNXV3qMPM7GwyrLl8HhvW2xyoLGCX85JlLB8qTlTkvv\nwssKi4qNtiYcvS0gbdUhO4ZzPAkEuusv9vxlH4NvQf1K9NetrbLXP72KMUAf\nJycC\r\n=5WwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMmXXS1N1j+usJqQODq+HZfDzHHy2ivUo+h9gWSng7nwIhAIMOluWiYKTFzGzeApdUoatmDdlUNNhK9PfYgZ6yUprU"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.1.1-rc.7_1590609030070_0.36940928898278313"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.1.1-rc.8":{"name":"ipfs-http-client","version":"44.1.1-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.135.0","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"f7dd1c149a4c7849ebbdcf73d17ed4afdb74fdb8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.1.1-rc.8","_nodeVersion":"10.20.1","_npmVersion":"lerna/3.22.0/node@v10.20.1+x64 (linux)","dist":{"integrity":"sha512-tWzzvxAZ2c4J/xF+z4rb0eN+/n12ArkCNNWT6zLweOwS6Zv+r95KDsTXMZNoRb6ekGRJpoGvFO6U1+PyFFV9eg==","shasum":"7ded2d1f88c68f6bf166f788996aa46199044b32","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.1.1-rc.8.tgz","fileCount":137,"unpackedSize":552101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez7z0CRA9TVsSAnZWagAAP3MP/0qZdfa7UJlEflOSdLw2\n7eSt7H0GFAwnOBK132xxUePB8HUkCPnKuaIQ7QOF3S1Zg+FkZISqpCA2eTOe\nxA7oT4kv/w6TDNdLMCAI3BZ9zPLyEcbpYqZ7t7SOjsHCBDELg2n9AIpPT1eh\nr6J0SxVEN1wcCFQIDadSno+Y+cxFoiyR3oueP55x+fzDJjtGdBNYZq7m8T4U\nKUHWbCldaFavCQXv8sgr8Cm8l7BEIbFmYxNSuJ52lh9SF2aO9vwUtXCxszhT\nC1bgQlwyd1BnW3G2m7tCYoGppLXJ2fQMGYycl+JyrB0d5uGrTM/nDo/hI6xk\nTtTmiSjMJQJY+cZbeOz4my64V97dnRwlUsJmuy++UvsKwGd5zPwh+9om0pSi\ntqPb5XtICkoSfdMPjlK+65hH/k3DpImqh+SSsVs6gzGmggSHfbVrxVLk0j4P\n9oiFfShYEEiHyvveCklpXB7axVLFAGm1gcFG6lW3ytehvzQ+9053d9S76Xn/\nSndaEa8Mg+mRI6EbkeM0z6utWaSbXuJal0bJehyWOFUUInPfiZ1bQU2CLJu/\npiYUJedBUHL7s1AnZmcCJdSTbS2m0drjGkQpI9HiTsmQ+YsPC0U1a8KBNVTH\nBTBheUxZus3idYBZkaFhVycRYL2IHsNBVeVPUGJ1TBDkmP1+MtO0AltAMU5h\nsCPn\r\n=CzA5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcNs0NWvRx/ZY3pPPj0VC/I7qK+Oos8UcddrviIUKd+AiEA47Mu0607BdHI4sHG2MPfXBnWsluEEZNiolao1p4/tGE="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.1.1-rc.8_1590672627776_0.3631174102220276"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.1.1":{"name":"ipfs-http-client","version":"44.1.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"0.4.23-3","interface-ipfs-core":"^0.135.1","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"422472c9699099634ce3c716f57fe43f989ae1c2","_id":"ipfs-http-client@44.1.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.0/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-+rK572yN2qkyrxqayF0RKcRYgthsDSkMoJ4HI06XcTkBiZ8CQU7nEn2vEswLGk3T45NK2TLb8lMUHfSELVvfqw==","shasum":"d5d72874dcc805fbaaca2e1ac3876cb33f2100a2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.1.1.tgz","fileCount":137,"unpackedSize":552352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0RG3CRA9TVsSAnZWagAA6L4QAIQ2TC1qJ0npNOHPQUWL\naRRlFkEl/XuQoEW8H9u0rUaQquc11hnJ9aPKWOAAYeat7i5+v6lN89xwS5Em\n8GrQ4oq6WSxr637tNPoHZ9DtUFOrTfpoBIeUaF1De43M9+T4A9ngXsi/gI36\nfjq8b9ROrqhLhTtvAT7p3EpD513eKrBza/0FUlfiUK53V6lN9F6D5i9UOqHo\nYJ3QpnTQChlvS5BQvNGHDLx38mvmnbskuEysMbRJF2VquqQiDPwtfqvVodoq\nWozM5W1KHbKOLF7o6X89TAtC94hZ7i2YIamuibxMt888EfdsAQ/DRL8bahm2\nsX38/jueoEtqpdJ20JJfl6x2oq6M2nCCK0/K0rRzGV7jyyCoRwj7KFVfcB6A\nlBOBThMZ7c/e8ZDjRm6Ssu3TFoERovtCfCX+cML87pDK49nWQipfASvwgYjq\naOiHXI3q4u7vqHxRxEYT27sRiwxHYLpbqjg4FuaxH/EfbvAQw9NWkIXhwHvX\nOt9w6hPgXgpxbLcCLU04JjaOG6WslfO+nT+G8raA4JIq4I2XLej7NKpA6GfV\n2aYpHIHj0GvvimpeEXgwlDKWjKIPVemOxoET95W7ADAwoEcIgsnNT35tYcH2\nKpw/YaTv15moFHdMLegDEqmCsyba87/WblCR2XAyB8LPijzGj+WoBT+bUA/c\ncnFr\r\n=xtpz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfSZLsTxvMi2I+X70sL86ROdkh/+9Us1ff+JoIy2gGTAIgB6/FII+hcf2PEBxpkQIhrxaeIsM2jaVpqZ5oIM7eOgI="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.1.1_1590759862661_0.2136917032523784"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.1.2-rc.2":{"name":"ipfs-http-client","version":"44.1.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.135.2-rc.2+2530bbcd","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"2530bbcdc8b54648996fa139e9c164147d93caae","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.1.2-rc.2","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-ow51prCD5da9nMDuvOobUmAH11PVncyRBL2cQ/2CxcRjXQqOCA7Yf5ZjPwlF7IZmhROrMj0uuKW4LaeyVE5JeA==","shasum":"91cb374e33d65066f47ce3ae08782902ff6661c4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.1.2-rc.2.tgz","fileCount":136,"unpackedSize":550966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2gCiCRA9TVsSAnZWagAAAUgQAIxLeXS6gOPvXi4Te1no\nZnUFdm3259DmS6/ckJUnZDD/TPi5pjMozZWeJnV/slDE4VS1CTTyLJqmqKwO\nBHQZFNtloENCbcvUQetgWihq4g3V4ahmq8XaXbdRQmN5G/iodwsDdlGgOUyz\namTnmL3QyipK6GFwdATVF7cTSVCwB9BM4b6FLi/Z3Egdv163Ak7PmYE8S413\nvlsRpbiJh+IR3t7r2seEAzb6NgZSQoShkd9MhE/IfYvGeJfEliehx9/7EMV/\nnzVhvrGpiOWNbdm0/O/YhkGIIk4m1hm3NvlswOMXdEmEpkO40WBZF3yWu5iZ\nhjM/oQvF9DFhkhecoVn8cKCawvk2rEX0Ou91FCNc9ovbXkFURHC8mW7nI6gO\nD4Dr2yxNyWt8ep1MocJePykS78IJBPaH0UVMFep9Qjm0xuKN0EooB1JqBjmk\nWsJNlnWnYC9uEA1SSPzem7lMLzT+3UauIsTMGZz9z2LJ8qRGIWDCrKPvfPOE\nTtGzupLGJfvfH6BqNg9OwEFPWid5obDulltxnYYdtQtqKABZhTah0+KqV4UQ\nbiRKzHHo66/ORufVOdNMRzM2QQcZ7rqAEuzz7W3ayf7wRqUejN03BNfTtPhS\nwBYib4TNBEZNDmp1TjkdWmq3SrAZ1UeFKfVTR6im6eWJZ09REqkL5Cd5pS/m\nby+Y\r\n=F5fw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSq82WSQ8kfHWbTeP7Mna4z/2oWdrNF2LWSAGOFnKncwIgKsEXeqxrwt4+ypcyDSgDoyT0FyngSWv8i/KCWwI0hnE="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.1.2-rc.2_1591345313332_0.925426164457166"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.2.0":{"name":"ipfs-http-client","version":"44.2.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.136.0","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"997d93657f75332e8cadeab2865a2d90ada60b5f","_id":"ipfs-http-client@44.2.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.0/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-M8MGu3DZHbYOYRbdUe36JOJlE++XAgwZyl3Nwgg2cLHlSyfMBcpdRkbJBbzSe06KpXow6M7VilP6D90mc2ir8w==","shasum":"d924c46b64689847cd46b5eac3669346ae48f03a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.2.0.tgz","fileCount":136,"unpackedSize":551332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2jvbCRA9TVsSAnZWagAA3IkP/jbsqnYSBEbDMHWye/wq\nfVOSrHDQ1QgnqOdw83cf6uBZBRNmKTE5jSCXD/Gub5VDJ8NqN3yrVOF54x72\nt8sBnwEG8ya+XYcy3TvNPFM+DKO+OOI+3GUNujulk9/bXo09FgYtSx0K2eWN\nWQPRb6iKe9J7V3pn7JTSOaBIpbDs31uIxqghkNzSwn93X0lM0u3pMLIDpOKd\nG1IYBjsu4BtoA5qrUSHDcl4c/kbCP58Btvgo+oAQRZ1JZF8f0hnkYcx23Je4\nYx07HYkNnKVgxv9wizg1oEazfLztjJOjX7cC7orKq71aYY6MenmrsysKoV9z\n7wBXcB+vBvAQ2/vY43u+msW39ZoURfdo9mcggffKd7tX5pUV10oV1Nf7t0Rk\npvwM4mQ0Nyvx8aucs12UbEae9kB9x/9zLNovV9qM+vB9Ss2v/eO/Vb5h920A\nNMvX3JUsmjMb45payAL0StHW9QaKtLSRX+uTkplMCt1PJtTurjcpg6cIy3Iy\nwbTLq2gBLKHo/IhJKio6Wx5jPBgnY994iNWsMOLBPXtLQ/bvaVMCQ+26Xf70\nZWP+fem8lXFfdCvK/mo+LIXZZTh8IUC7/f51xmArnxnTWd+XnxptyXq75TwX\naBOD3vMhrDTZIiGhUkX/2H/zOjiRBuAsrAFDSiTUY3Uj8xAQRmMDT0vcwx7E\nE1kE\r\n=of9n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYCxcyYqxXR+065sS4/mQ9Ip1hLCgNFdGmRkJlQ3E91AiEAowslzA74fRXQwitd8Ucg7/RkKr6UIbNVY5jKrGfBqFY="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.2.0_1591360474646_0.11537065985575667"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.2.1-rc.2":{"name":"ipfs-http-client","version":"44.2.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.136.1-rc.2+463ec665","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"463ec665f8659558a75bdb1bfc01f1c93f5889d5","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.2.1-rc.2","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.22.0/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-wI55ScYLQ4KvVfqCZJj2TDCPiMdedhv4wwErn/aqUnMxUbERNozHJbxRSbu8z4gZJPYNpV5udVVoLI6q1L4Edw==","shasum":"1cd63678f5e416be0792205b32def8a206560844","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.2.1-rc.2.tgz","fileCount":136,"unpackedSize":551274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3mKtCRA9TVsSAnZWagAAIE8QAIDrbzaUNdhU3nyWzX7j\ndGvSXbDbI380ej/AYTBz7b30o366XWRC/jL96NdFUSZIaSKvWczW7AOcfTf0\nQw5LOhydk96LrJ+I7fLuL7z/G8aqKZF4qqiitbGUwcJjad4GkOvp6aC/7ymg\ndOXjUNejKTIrOw4bkOM5NtIEB6820g8RTUIFpHKDRMSzaZPsGGmHZqeHvXKb\naPT7+rsIXmq+oZQ3EYe75SMplDhF3TUMrHcEi1QqkJVBULKlNICPShJDYEdd\ngcUAlIDplWkOHkCeWMPsPSLsWqwy5hZtbTesXDNaXQnGXakQ3WCXvGGgggyv\nEozPQrMSSYN9CmsPVcf6zFfEe0hTl1roepBGVlnJeVQTnt2XtFdlTHINA2oS\nCiOTG78Ca6Bs3J48hKnd7UcwcxUK2UVAds6m18PFb29NT+mvK3drTZZZUbRu\n/6dHwuQhHtZkvddy1gYIiTNwHaIsIls/pexkCvU3V4i8c7wH9x/gKSS9wJSo\nPllRoGx1CtwOIUXkkswibllf+VOuvWMwLfjeyzdHdK0Lapiqr/wms7UVqwu/\nk5GiTHnCg/0UabXXfGsplMpbwkjfrP33H9HXsimkIXIb5lRbE3YmWjnoeJqs\n1U0fj//hERMQt05sga8wtXI2eKfezu33hpWN/VmNpPxMUhPiEwRswtonbQ3C\nGd9o\r\n=1wTm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDlkPEz2xXCdUK8BHkWq55rhvtvSxi2o5zwQxo+cONELAiEA5C1Z9/Sf4EZBoWkmNqBIV1NbRXovO/+xRnWiPUfQn08="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.2.1-rc.2_1591632556724_0.8781648719512929"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.2.1-rc.11":{"name":"ipfs-http-client","version":"44.2.1-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.1.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.136.1-rc.11+16587f16","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"16587f16e1b3ae525c099b1975748510638aceee","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples folder](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.2.1-rc.11","_nodeVersion":"10.21.0","_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (linux)","dist":{"integrity":"sha512-KdL7fpWp/eVn+Dj1igOoq4f98eaHyhHU9aRvN09eHdV4hBIHWqnGYD7FDSpg65pHJHVQqvOB9v0AKnghrjTomg==","shasum":"24e9f348b7ccc9d806764b539d9479d1721a8976","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.2.1-rc.11.tgz","fileCount":137,"unpackedSize":559932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6OSOCRA9TVsSAnZWagAAPVQP/0pRzbfrymQDg3u5KGwy\nyQbl3elFpOCFq1MmfXJ/8Uw6ddr+isog7ZxpWNmUQK13EuE8OaBOB5SiPBfV\n0xMp4rhAtJZxdxlCu2aHsIPfgxfUxTJlqk74xDwADqGujAOPeaMnd14Ak588\nzG2zReKDoCjy7w17haoWAOsdUM0uF1QOEWdcGlfGdxEWD/KwzDB9oXM8REsp\n5Jz547zwoXFkbQ8nYLahp7IJsBDLiTsC3DSNGCgoUXjrjA9W5AWGvvH8wDQy\nAzSZzK7iHesQoJmGdeXOZJSaB4GjGR7OS2V2Bq3JezqfzFUfUFAWAHb6gewo\nVyyitq4TVA30DivHeJivdp6JGruF/FkfmRIhMJapgyZT7NHjHqgfqsOwsSiy\nRoGUfrkeMy23WmYIOP81SGhUIGF76RalN0jaKB5pLYR5ammMETuMJFk6YCuZ\nxqTkLwjzZhlrWkUjSJ7X+obB80a1JfL3bNnZCtmqVTmNrnQCTqK7U9bdixQX\nGu727ErmrzF5WBA/x3nGTsd9ZfVy5Zj8X/31IPfLCwO/YVr92fShOqRDFHWz\nDcHsT/NbhBfnKTWE2FYNILse3py/7czGAZQf63uMYCNmlzt6+WS3zuuC2UGN\nlI1m511jmM7WuWya4nj3BMA7mjnjQtXgGRnt6Dqx8OD9mTK7Jr+f0dgqk1gE\nGVzR\r\n=FLqg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr1FExaRpxopPCBrFT2V5Yp/wnHlYhHFvQbw87RpQCngIhAPhGxFX3pUaTV0Az+JWIZD5/UNZmijm9wGjDd1XEqoMy"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.2.1-rc.11_1592321165805_0.8928206057775665"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.2.1-rc.32":{"name":"ipfs-http-client","version":"44.2.1-rc.32","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.1.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.136.1-rc.32+21dab486","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"21dab48691d9344626f5898399fe725176f6dc67","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.2.1-rc.32","_nodeVersion":"12.18.1","_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","dist":{"integrity":"sha512-ns99R8JWAmW2e1c7XFnckAHtFzqOEaKEUiHFF5druUuvMUK2neQTdNlIld35vj0W1+7/rgMVCTMemmZv8ClsrQ==","shasum":"9754c915bfd3188138c496d59d4a903e76ec160f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.2.1-rc.32.tgz","fileCount":137,"unpackedSize":546360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8e0RCRA9TVsSAnZWagAAr/8QAI5FmGyfeEWkHaGRmM6S\nH2qDGyuqsnUFeCc016hFreAhhReR3o9NFilf4WEzAkCzOe7NyRZnzITpAXcE\nw4vyq9Z8uiIe5NewJQoOQ/c8vxZsq0yJjTFOyQrScnWvku8b8JQi+VRvOujU\nuzFBi3zAsEIgvNESdr/h7LN3FbVgQN0rJCc31T7gzBxAv8b9kVA+pyvxssIV\nAtc/ZY9TX/zO/Pf4qrKF/fiuDGoec6J0sgmwmkUVGGGYUdLt3BAI8OhpO/fs\nXYFbUskIpxSZuvK5Nag4Yj7Lj8vCdpfeffmdA3avDMWMszH5MSKJmsYsLJLX\nkdz1gj8g/p9tI/1IgLRb4L9UGzQ+DhmDQhEJ6ahJYW/d6GgRCJzYTZppeb99\npdjycsPQodkbrRiSFX0vdr54lnxyxj4MElWZBzbX5p/GJsjuGeHQtDahyDZj\nYB/auogZi9sHY1SrMdi5kWxOQ4KOZ4U+6cXLoRL6ST1BlTG+uZsHaOOXuIy+\na86+QwCBBwkwa5ylau4oeox4yqTOeTNStXyGXRFjL9sdQDtIJB2207u6uA5M\nn7tjjr3o5aCVnKe1EgiT9wqGKVlpKdGRxzysCW56KDXrZl7TmMoU/Lnag0UY\ngM6iNaEW6UtMFsMOsxJYIrV7L9FFivo7S9gJ82/G4uNeytP53nYvRCc4uFsb\nNfIc\r\n=nWRx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdd0tkQtYTCh7t6mXkyRIjt1iDU4xfCJ6mTA6nliIWpAiBDYa0RwBOoGir+BntLsQBuVuJp8l3vdQqO+rYKXCf1ww=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.2.1-rc.32_1592913168381_0.03273210656163106"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.0":{"name":"ipfs-http-client","version":"44.3.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.4","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.1.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.137.0","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"274040bb440b534f8bc7bad695d14216ed4162d9","_id":"ipfs-http-client@44.3.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.0/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-oGlD2GkyisCrRPgJYrpo6TYA5VZneCoazEaaKxc1fyGd9TG0Fvc/nBuwW6jB6I5CR78z1JwKr/71QlvZL4jDNg==","shasum":"30921a27b480de7015d555049092209a3832d34f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.0.tgz","fileCount":137,"unpackedSize":547197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe804cCRA9TVsSAnZWagAAdAsP/ifliV4X5s89kvMF0Zde\nvNBQlzGu2+2+8xkdZplrRHFQTUFEElSG5w8XBPnEYnv5ns41wCWeg1T22j2j\nj1fW6xmfAfjNkmyDnFw8Ar8xTHMp3zhlfnQIsicllTtuYGYQcTISfEJ9nog4\nEPrxYe1HRQ3cgNiEj33GFtEf8+BO2BOVBRz2Oxp5hv9oHhbaCaS47ckFjOGb\n9gF0EEfmQsGbZB1GYc0YBenUvLlp+9f4HZI9nr/KZrlkjXfDK8AofZkx5g0u\n8lym5F812heahuoZ2x301bU3xQ4w1FAYXkBToBN3of7Au+sMGEhGJM1MmJpY\nb5oz35HN5mciKo3HhqX4prxWEVQJyCeYRncQuXMLavsjBUkRNjNUMQqatR+b\n3jcBvIfMm/UDPxrzMkGMfm9dMzWhtzkGmSqWVKU16tJ8c1imh9HUof4RmFH+\nbtGGCnS8r7PwW0FofdD+6y+tR68moEfBvYFv7osdvsdJmXTU9YLiPVdOnoM+\nEVLVsi9nt9mYFrZf238L2y4sSjjNqYIY9eQ/Xe4ZPJbz4qU/tYoP8B0Avkhc\n/lgOgjF1Xr3NEcdmx7ycoDckxCpZ9yBTWcWQbIAUB4j3s/t2r3FkP/aFqeD9\naC+htwQkdYI5tvcd+GjlKYSftpxpMAWQswPEUr2uFCUXWXTbSHLIov4U7RBw\nPJwC\r\n=jU20\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJBAkfBBUBtR02TuCbLBMivPWqClmka9eXqExMtSHirAiA+kyM1/xCGkv8qlzYST3bclW+PRE4Ck++64H8arx9/rQ=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.3.0_1593003547730_0.33138348523195704"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.2":{"name":"ipfs-http-client","version":"44.3.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.4","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.1.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.137.1-rc.2+343bd451","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"343bd451ce7318751aab9934981e3727c6025234","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.2","_nodeVersion":"12.18.1","_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","dist":{"integrity":"sha512-29KtKuNqmKrjbRfqSeoih/SgKUQOqNfNVi9UKGr87XuIxeu33wz6N3YxJJBHHUxkekzhpHYDZJAyC+8WRSzdCw==","shasum":"6e21fd08e7a8749bd20d1a6a55b5660b2aa6fe1d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.2.tgz","fileCount":137,"unpackedSize":554263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9JbeCRA9TVsSAnZWagAA5RMP/3WojoDRqUbKsEsAfs7s\n+HCilyGKliQ7X4gccl4Dx4sRPwkD9NBqfqyx/eiTNDn17n0F5Ww/7B+Qy4Vl\nOSKFXQn1eWgWyIwAcinqXrqk1qoqX5KIxihSjtFARmtTNQNGzvjwIN+ezQMv\n1/NQu+X+KSionm7qqHkbXkpNJ9XasptnAgxm2ToGj12xpvPZH3RNZPqNjb/G\ntHatfgl44CJ94oMf+QOxl0cXPWroe7IsU0L6SscDKa0hTwQ39xAfmUa8gzpx\nZyONqxa90dnNywIAbM9ZnW3eCqxtQfIAB46BTcZRWi9zs32eGfgJnICBZYyD\nuMUXwjybbfp74GCh9JPulrNdW743hgIJudFzXXV5hV6XiItg9JKoyiEnGqF9\nfik2sN+SUxZzvcWVJV8L8+ErJoQrkqQHIiy3y69H1VBNY6aGz64PyDlrja4E\ni/EeRvl1E0TUeKFHSaSP0/73Mao6+xG/kpm59pJ2zZSTK35azF42LU1HFF2F\nLDGL3CdeotUi1899jPxQOGSB6pbkwzTF1b1LHa4rpAp1hoAcgrcqJQ9npCBf\nRFBF4RV21y+69W8Y5VpoOYu+016KRXO7CwwJK8EvbC2lFtXfvtZ9Dc+A5SsP\ntWCzLnNNQntyq5M3X4eNbWLxp5HlB1qaAJnVCdI2vhsH6hqvwDragt4Y2evM\nKShF\r\n=bN0e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIELfmdwo+mf2tMs708lwPrwOBYkzGWEWZ1wse3/tOZyDAiEAwaeVnShhI9UfRF58H+drTan1Rrs6QUl5zXAwee3BJ2o="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.2_1593087709454_0.5905839919101732"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.3":{"name":"ipfs-http-client","version":"44.3.1-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.4","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.1.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.137.0","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"a96e3bc9e3763004beafc24b98efa85ffa665622","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.3","_nodeVersion":"12.18.2","_npmVersion":"lerna/3.22.1/node@v12.18.2+x64 (linux)","dist":{"integrity":"sha512-riQsoMR4dT2pRqGp8codqvQstjA+OwyXiIr1iEl9zPAd0KWP3FXav3E/ycxuyZb9BGN5+14xo0zXCS8iSEUU3A==","shasum":"bb54ccc69f3c8152c60c86073cc14fe45e4d4356","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.3.tgz","fileCount":137,"unpackedSize":554322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/HKXCRA9TVsSAnZWagAAopsP/3qm4MCk3HIIomOwOrrV\ncg5g0CSx1pt0hOv1vpL9GNVVrKD1c1yueeN7G9CG/5tunX7xDBdG/0ylD8n5\nB/9hstqUqGpxXCPCuCUXD3D/l2vWLnSyJw4dVO1XFwY/bFnHB6OdbGr3TqAc\nVf9kUSSljna9P9tmkwrpLn612vKrRt7tYyVxKS8QDAZTib9jOfauZxmoPZnG\nV4Droobx9AMLVpAuC0M37QcQP1uGeEhbknKHkcoUC6+61Ah1Ws4nCkH5Upf+\nFd/nTG4U4Eki7NuDU9guwS7upVBiZGVH0pR9mPXGCremD2+H6PTxiuEbdE7V\n31aekkHInd/PgI4v/F6QBG3kGn2TNgtomrU8ePNC4BY/j+U+6dfiNnCPFYFW\nNkdA43SOm7ddlxmEwBjh67YFc8Q6+ofqjAXXmY3EvJRcAeMfuWnq2/yrp+nb\nRCxd2ISf02DmBwgmHoeQjk80n8Rpc8aB5U+kL9kyx97EuUX7WTqK+k8bj7ny\n3Ksxjp6esjrGY6DG33Tmw8EBotDFPudoUbG9nydbqVZld+PuG4jQeDpB99gz\ngiS0069QPYuwswsRpdrSz7wRudOL+Am5M9+nUYTFZkk6raZhAUMMuGDzExNs\n2YNVGvk9puCDjeOaXLn7GdmxERo+ztSEi3PB5sXciOO7iSJP4W5mzlxAKTIZ\nJXox\r\n=BTHr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdSaz56EMlq+/kZD0kyOU6VVJFULmwidVJ8oDz57bNwAIhAKrAloh8pQ/0ukFQVeSxzKlHAl8zgQR6lwJsW7fDnv9f"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.3_1593602711233_0.9030207771478158"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.5":{"name":"ipfs-http-client","version":"44.3.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.5-rc.5+03b17f5e","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.137.1-rc.5+03b17f5e","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"03b17f5e2d290e84aa0cb541079b79e468e7d1bd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.5","_nodeVersion":"12.18.2","_npmVersion":"lerna/3.22.1/node@v12.18.2+x64 (linux)","dist":{"integrity":"sha512-7Ra9K5F4ICJAYyGnG2Mlp4yeaPmFzwd9TVUtoMCvqqHsGtzeyF32utkigX9xpiY5CNZniGfx3Pu4V/kGbva56g==","shasum":"1b8f3860eeabb8b5af417a4e38191b0ca2961c39","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.5.tgz","fileCount":137,"unpackedSize":550790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/d8rCRA9TVsSAnZWagAAC/QP/3CXWQ4W3riIEnLQkGI7\nw4lwcHHToKRI0AXnB/JvO5wbztVrgc8B1wih1hFEhV7gdtSigGcFmiU2T6hF\nMHpHrszsrBapeoUKRha2a5C5ODjx93euCsTXVM8Omh/CaIvc8fB8TKH8Gir2\ncgq4Dc/fS8EdIbvy5E23p36xtvbq58i+3oSmCzUb7vIMCkVxz2O4R80ck5a7\n5qi32iXGOeQWvw8Chel7wWqfSfNQ//iIHSfDkpmaqGPpW39Cr5ERUZ4apFDf\n1/C6klJfAkHjD2icwYECNPGDhp8plahxx1Wi+sSS1ZEP4z74WNF1CnXj8F/Y\nnd0GSqyQkNZDntPQFRk07vB+SHfw0EeniOpRJ0dLf9BJuhKNzkGRh+dzBJHy\n/hk3LokCmtQXlmCjdxGM0qF02hYhrD0kUXqB2e57M5Uraug1DbrKkfX5KVX1\n3UiagbPoqh8PPuTvnBwatMMR1OqTv+s+jefrfzEwi0o+ik6D69mt/Hl3PZLu\ndilo8JY49WGe8FdnbLLUqhyOEXNxPln+r2rReoRt5c4T6Xv2k2rZDJ4N2y3x\n8lQzhr3ztHsq74jc1sLwDr7weraEtE5OqT7ih46I27VHaR1invV2mQ02g3j4\niGwJAKFG6RT1U1drsxRm93vti7LJY6phvE5QbGbzTJuXmbr1+6qSaRsFj0Ng\nWcTE\r\n=Ft6j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6+LPkIj9z1RVuUam4ev/ZOtrBm+ojUoY2FReBfqDQYgIgG6OOvxL+RTUDG47xghrBV8gaaOCO25apQXEPhAnol8w="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.5_1593696042835_0.49760520376412987"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.6":{"name":"ipfs-http-client","version":"44.3.1-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.4","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.137.1-rc.6+65f8b23f","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"65f8b23f550f939e94aaf6939894a513519e6d68","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist(key)\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.6","_nodeVersion":"12.18.2","_npmVersion":"lerna/3.22.1/node@v12.18.2+x64 (linux)","dist":{"integrity":"sha512-jSsxRcxG7rLBIOXxlNnaqylUjz3F6BkgcrGMihcE0e5IOdh9H1k5eWTLWYxAmDSYaYuQpSGnxxykxmc5D6Qk6Q==","shasum":"04343ddb0e15fe04289031b989ea3dc55a5720dd","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.6.tgz","fileCount":137,"unpackedSize":550776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/epZCRA9TVsSAnZWagAATJ0P+we/2jdzCmsLNi3fGS2u\nQHpLncxbtw2u8UH09fUg8A1Gnde/Xw/MScLOnCCI7RLKZ8MRGXjiFTfEcsiR\nkg2H7HNcrbOwLKG9gkJ7pgdtuE7hwwh6Zz8379uKH5GY5+vcKjqn6J6Fga3q\noRUrZPQ/7d4Obk0RS6GdXSqt1/oY4FaGSm2k+PmW3CNxaH9S0jlONdkCt0VR\n9ZXGi3z7yl3B83FPTpXib0Lf7lq/ZOCLV8vk6L1EVgL6NiOdLCqf8E9AebFC\njEwBtM21ePd9S/QYlLnf7RGdtVYvbySk+clrUxzBRpKzq8DhrMuBZ96VODkL\nIFDKihTv1QSYbb5pCXwQATQg1mJqWb5XewatRreU29f76D5ZhBbGK/UaE1CL\n2K9yVx9nhsvXTAAA1ZzyMTjiSHbcExRX3rit2pteMksw9MbxHbfdpYhPUxPx\nGkTidgIfKHlY9iDqfAGAaQcvTZkh6DGwh1Nr74Xj/gjrXag3yb9Pvxav0B4j\nj9BMUeBVqn5zzs1MZT7LK884x1bNuYwNh5q0XmAhv4oLgc2SbEiNvDki7eF0\ne4cGGU838+MY3knNGBcsWq5JCuPQ5s8dYT21mf9nEMOQ6QE7d36FKMrcuMmi\n9oPcNVyl86ivguayYwUWacvs2wOOLc2gV7X30GWo08FoTwb3UwmeGLUN/dsZ\nJab8\r\n=OcQs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDs9DMbICMccnfJmTQnP3Ulg5ruh7buVOO6zmQeCdBglAiEA0eF3r4NrMfmktNo7UJjDYe/j3XsBnUggDzMCQcm2wkY="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.6_1593698905279_0.46440180275715814"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.7":{"name":"ipfs-http-client","version":"44.3.1-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.5-rc.7+8cb8c730","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.137.1-rc.7+8cb8c730","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"8cb8c73037e44894d756b70f344b3282463206f9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.7","_nodeVersion":"12.18.2","_npmVersion":"lerna/3.22.1/node@v12.18.2+x64 (linux)","dist":{"integrity":"sha512-X6NxfojVuvKe3wQEJKATH47p2yME6Dl2QpF0dte+nGQRUSQFRQ1kU6KrsmVAmUuNIV+kJtEUVi6wN1NhcdrYXg==","shasum":"3675e1aba4fe0af4fee808ad9d8ea887d62784c4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.7.tgz","fileCount":140,"unpackedSize":554793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/iMmCRA9TVsSAnZWagAARt8P/ir9olxYYJ5WR7Y2WJ96\n6LV1xnpBZ35uZIO6zPITDfnCCggGMbbPFyQIxjWZ72PALtiUoXCz4GIHE9xQ\nXm55lvvyVwHTnq3bry8vWrXpslQscz68hIIpKUDAaMp1wmxs1KlzjduveAY9\nhwJqA9UljyIPNYU4ZqkdfI5F9/fJva1yMAPbQBqlQHDBTp3nIB/A2oGqx110\nF/FVE6OEnLZ2NjWgyb7bXF54BcSNpreefvcuIJyPDd4rvbfuf5f9dyG5UmB5\nTCJ/H+8Is0VlQzkFdc2uCOhirLp8SornHC6Q1+DvtDfvoEyATYuQAirfJm9Z\nlhD880g1mX0Tzn6/JFOEDypZdYYz610z4alZMQR+SGKyl688CqckvGr/YTk2\nnLhtNodEYKidcvVrC+fzkDKdHCnDwjZ3rz1FgNHuJjJuZcANfU+Jb5R+Z4dR\nS6BMKJ1dzR1AQJxjlhFDVjGMjKT+Ak0A5mLZbLeBCd7QmZv+b4R33RohtHB/\npUnHLGwL74Je6IzW17SvC/dJXh1XrmgKOqSa3GL6Rcm940ni9kvs7z/aZ7HM\nsL9qGo5NLoY6hkYWnySI4nFtKlqDGtbtNYAKsTSqMI1J097xMvJV5A4+uy+Q\n+aK1MUgqPMqsQZ1KL1tiW2AVQJ+ssplUhVmwGGkiaz6ZReHskjSrYE9AN/Ki\nK21t\r\n=eqtY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHUF6r8fQUbLTV1d9kHPZAFJOxC3SYts55VXJu10XlNTAiBYeZSpqw89Fz6JLUEaiOVmXjmnT+uuCBntlgIBVSVz7g=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.7_1593713446031_0.21505614737695078"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.14":{"name":"ipfs-http-client","version":"44.3.1-rc.14","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.4","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.6.0","interface-ipfs-core":"^0.137.0","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"5fe9495b39af06819f5ad3fd8d50604fe7177ca8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(globSource('./docs', { recursive: true }))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nfor await (const file of ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.14","_nodeVersion":"12.18.2","_npmVersion":"lerna/3.22.1/node@v12.18.2+x64 (linux)","dist":{"integrity":"sha512-ge/T3flvjZ+K6AKDiV3+7QXaivL/PT4ZAPrGBwVoOJGq/4xiZl8RNQBxGnrGbKE2zWtp2m+y68h4KHcVF7L8Uw==","shasum":"255490fe05fb5dc827e5a28c212b742695041cbb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.14.tgz","fileCount":140,"unpackedSize":554766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBMaBCRA9TVsSAnZWagAAmEMP/jYUM82ymwVWEbpxWfT9\n5U9E1pBiuQ11TBL8Tky9RneWKqfB7zLT1uyyErFpHlQWPiQQrOpepdBDvFg2\n3EO3SfVapJBLMBwMJDy/rnAzMu31fQ9Cb5iKA2pJwqMCCApVM3uUHuOhsrSW\nhWc/hrBnaFc6/xeZLmP50IX5jnM36ueaGaYT8nhEyajkC8Q65YMB9R9b3DIK\ncXfO+p/fs/JIpg3Zl9M1YxHYfsTnJCUSgITcpchjgrc7j3T/6DWhI8/9OeK4\nVkrWWijWJONtr26OFUMp3uBcJiSkjfvrdaHkduOOa+tNs1Ss/3fAaqxZh2eR\ntjTYGzDJbH2hs82gQS1z0kPiKIZmAeQoRMazI8+j9EEORPMoqTauhuTndkDn\nE1sT1xrX085E+1EfuRXU+jrvhqMUqpUDlOAEwkzNJENVcawROnQSHMZayHHt\nAUdItMAEt3MhYHOIA+V6Tj6dKyTv5YFQ81jBbX1r6d3T2DWvFw5XnNIbP346\ntrBhyMvGhtuzu/7CU/MZAq1qdEQS+VdJvqAY/ENbxYQyeAUlXog2GBVq+Z+b\nKgaBzhnCn2GCRVCRou0lkOC1j72Z2+sCX+xECUA7j0yx0PkHmfnOZVHLydOj\nQbQGxlv1Rps2ocPBFUEKrkSteVwBdw24NsleqPvL2tWVEi0E7fm9b9AaxnZA\nEqoO\r\n=88Zf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4anG4pMhhTF6v5mxM940OJ4rf/w8jjeR4/tIg4GkMoAIhAJ736S+ZFnZB1CD0mGU9I1j1aFNyt38gbfJEHmkdj1Eq"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.14_1594148480850_0.30004585265849304"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.3.1-rc.26":{"name":"ipfs-http-client","version":"44.3.1-rc.26","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.4","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.137.1-rc.26+1760b892","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"1760b8928dac14b3abcfa4a889042f0d7a956386","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@44.3.1-rc.26","_nodeVersion":"12.18.2","_npmVersion":"lerna/3.22.1/node@v12.18.2+x64 (linux)","dist":{"integrity":"sha512-VHXOZQFOcfX/UgcqIAjMDl3ds1ELQo8DH5ZqOL2NCCCvuMeYJjxEmT37kBe9ziufFRzh1ho/ZePyIcAaIMWbsA==","shasum":"a81d350709cec1798844a8e8223f0195f8ccb7fa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.3.1-rc.26.tgz","fileCount":141,"unpackedSize":555895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEEGVCRA9TVsSAnZWagAAREMP/ipaRSJgAujxm0xZ6Shb\ngxxEOrvEAPg3udwKS5QqoS1r7/LUKzeprSUqw92pFhocii2ml7STxIVx5io2\nLMG/NVwxjREAs7Bi1jceZ0k6aicq06FmShJjxxVWzUjDpUK4qLAkU1TODNAs\nL97QvljnVIRiVmXrbZg1IbOUaiYiXYk1qQCVoCG0J6yeAZWIuj9FHBvaDv9b\nySofo+Le0eSsxdY66woyACP8ihQbqG8agAeauoizMON+36hmt7LPJv5YEV15\neWdbFaGqDhIrzlOXH7GYRT0hGpn3eKapET+huGie4O9MEBdsE8usMwLdPusY\n7Smrc2OopcMKkkRSsY0d+TRKLXhUjmsC+Fjb966/0vnkVy5TdqBQ2zx99FWr\n6n654RDz1W2KO6QA2qavu9GB4eM9LMDA1AH78IG1mCb8kCJ43BzvBe3TTH+T\nZKVjsYueNQ89RzAbUd0TLgWHJcFPTsCWrKj5sXNuJR+x5gSTqv6xTb4v0jP0\nGYwIozkWrianXxPwJHbJHe4E6nTFxr/014tH3FBMzU5FG4fTfeWtBd6kq2TA\nbXlZ+SJRCFXyMpqUtpZXdhYxqhPDyHafYOFiILwVbRDS5lar5GvbUjIYQ4oU\n5som9sDQ8B378L3txPcmoGWkLF3UhtVurpaZskEQCgee2bAqczZqg2FhAeD6\ng3Ah\r\n=jNJQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGmRtXXb79nJv39QfJRASIQ6WpEwD8Br4XXkAPI6HP6yAiEAzF7bMowmggrw2WvkCDm1cBnymXN642K0mNqR1NUvbZs="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_44.3.1-rc.26_1594900884663_0.8613043865143271"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"45.0.0":{"name":"ipfs-http-client","version":"45.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.0","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.138.0","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"a64939b7dec544b8ea3e52c5f769c1101fc8cec1","_id":"ipfs-http-client@45.0.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.0/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ccD2LCVYnSL0yANFQ2GboKV5RTk6Qi45T62Cz9S86qgKa8vw4AK8O30YncHOzbkbuCX1yRBkncYFktcDd/W/nw==","shasum":"db2679ac5f91fcaa500a3eb78c8409bd30a13944","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-45.0.0.tgz","fileCount":141,"unpackedSize":557462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEErGCRA9TVsSAnZWagAAp6gP/iK5zIDkH0PFIdmz12NU\n77nLRNpQRoyZ95yqELUACclWv60uzB5IuIeA8JUs1YZI/yEo3PofXbx7ZQGb\nFWzmk2PUS+wCP9ULIMTy/KtfbW7/kIFB9tSEKxMi5DhXj7Hs0+hP5xkC9h3r\nb8uzynajauMkkL55Xk7bPY/CpXny7SGjWFEgWAMSXSj6Wu6ZO6hx+DWYz/iM\n2/Xbk/B8v91q2l64oaakH7WeKjUtNDf6/dDDFN3DvyJ2j2EdtVlXKBv6cEcd\ngdvnDbDCW/o/sJMotejr+RphnhndwPIHRUeT4/91RQk+ABqM9qY6xuGsUcyX\nxs0EJS0q3yuLzKihsLAhg8CLuOPHSsXEnU01Xj5Qo0TZOAb/H53Q2TufYguV\nRNA62vQfVERR0dbTga5GED9A0rITAvO0Vh7+oPCjSlcvhgSl6J12d7/Yhooi\nWOry3jgBd8wIsndwobiS/U7p+gtzfYeXJf+FXzg6QHYdW5Dx+GJiIfKP9Dex\nqBIleFuJifvHyQgVMiAXOdPtc0JeK32HCL+//WTnnIRtJNkfoRZrl7Zlthsy\nhyWYN3IxGvq0kVU1QwhQs1G6FNc50FFZDpmLf6iKV3ZfwGHT8liwgO6VwbIK\npo88kmBs52MZeuMk7y2avGs57sjRafSK2tCawotvEc3FgBbd4WBVwr81IVHJ\nIHL/\r\n=KjIr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG8sAy5GiD59Wt/QpakWYvF7lcx2Dq5dJn91EfkQhAmWAiEA0ItkQmpIq+rpKWzBIOjfgoNVn8+JIrTkJAHxLCRaWbk="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_45.0.0_1594903238291_0.5331368801508409"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"45.0.1-rc.11":{"name":"ipfs-http-client","version":"45.0.1-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.1-rc.11+6b244634","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.138.0","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"6b24463431497bd13b579a730ad7063345729ad9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@45.0.1-rc.11","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-WP+arIxXwxGvHD5XgeDR3Nq3Hrr0++k2WHcXEikX8HyCoVfrvdWq2VK/DTJT1Rj2USDI7wO68+VdrQBE66xoEQ==","shasum":"fbfa472b856b82e5150efc4b7a5c0df1defeb0e7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-45.0.1-rc.11.tgz","fileCount":140,"unpackedSize":555370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGV3uCRA9TVsSAnZWagAA9pQQAIbFcelvxLK6qGLrFP5Q\nfbuKgvLrT3gOkr/hjdGprd6QaBoFmxclI2uwoWA+imNY0MlIAA+solCZMZsn\nxWCRyEtNxdTDagKgD22eIYtnxJT735VN+te3XVvwOXWUvKtpzWis1zv1+D7P\npNaDziid650OMAo4qy8hbLoolyIU9P8o3hDDbkiJ+FkGK4bVFR04RyDyN/Qk\njFFNFnBevY3YhCKAPir2ycc3i9BqEbbP83iICUy4LJtM3VZayQqS4IYW6zgs\nJWgePbhQGZldtn4mYJpsI29DwcrvHhd1YlMOacGK4JRRfB9wj/Fq+dtNEii4\nQkNZqOlgojD4Ur9UGGwjXg9UsaEOv+cDwIYbHpEHygyFUwuaeVVcBUQiYwPY\nQeSL1QoPAbie8yVB0shHWqw8hRiAEjRiSwSnI1TCRPBvFv64wO8bh50+S6Kb\niu68Cy/t7CrL5iQBI+HGMMGYlvemUUoZqOzB8CcBtg4dZsF9sDwLxBoUeyoO\nZ2Z6i5zrNjozDhxir9fL9Ka1pZe4D+tQc0q/0IeoGVQCHU1tC3YBk5i63UmZ\nMIE8rR/JoBXpDn4StpGzaDVD27ulq7apDSXIkFLYBw3w7/b4/oWV4Hrj3pYg\n/byeGpyNgQyEh+rD6xOQ+i5WFLFZxwPIcQiRrbvscAw/zN2shtpjhx3Yluqz\nI31m\r\n=5GPP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXIpnldxw21fbd1I4xA2VZO2xVlC3S8lD3nvNlYgv1YAiEAh/QpE/kwnueC++M8Usx90iY4gbxMQWWu0JfHNur+svk="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_45.0.1-rc.11_1595497965598_0.8377639651614026"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"44.2.1":{"name":"ipfs-http-client","version":"44.2.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/to-stream.js":"./src/lib/to-stream.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs-dep":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.2.3","ipfs-utils":"^2.2.2","ipld-block":"^0.9.1","ipld-dag-cbor":"^0.15.2","ipld-dag-pb":"^0.18.5","ipld-raw":"^4.0.1","iso-url":"^0.4.7","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^0.7.0","multicodec":"^1.0.0","multihashes":"^0.4.19","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.1.2","stream-to-it":"^0.2.0"},"devDependencies":{"aegir":"^22.0.0","cross-env":"^7.0.0","go-ipfs-dep":"^0.5.1","interface-ipfs-core":"^0.136.1","ipfsd-ctl":"^4.1.1","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^12.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"7aaf57e738a702565160f78e81bc8cab99b9f2e6","_id":"ipfs-http-client@44.2.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-MQ4H+5e/RVgSdKc2SeSDmI3znZCNYTtaFEEaNu9NcrNym2q7er/7Vs3k7YM2oaTDslQ9L1MzU1IXviM5xWd9Ug==","shasum":"389599b3446bc945257c56f419ccfd2d9a1519f8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-44.2.1.tgz","fileCount":136,"unpackedSize":482747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM7zACRA9TVsSAnZWagAApIkP/1AIoxxr06qmSFbenOx5\nab9RCTo5rH1RDoheFbgrdabEhYGH6vPhTmUI5QtnVC/UxuuznT79hOEUbku0\nk//NgibUm0HwOF9DauVp1v2wrPcef1ysvTQR3DuXOyryFEMaQeGHXm6YYIHZ\n/PZ0qq7+hbz1UQKcAENx6gUrs4lCBmkQqdwzLb8zPxLHmlFq0CYCaHuuzmwO\nZYmcJW6WGra5vqvkxS6My3DCnYkZYDuknkoOiC88Hm+qqRSFBCL8d6rdL5Gp\nqAakn8p/hQE1q+LVFQOMok5oMC03XSMLK3LX5JM0IZm1Vdey8kC9aAXn+wNa\niENSirN4lgPfhL3OPPjVEUswzxLlpDJry1ARYUkJqh2NVM1VNN51/F2fHIaT\nWf9+nsdcnebzzNow/2PhS3mKpgFWxX+3CanvVsn1gaiTyZZyMOj0SoPxdR+R\n/7j2wkUfghs6iV/RmN9GTD9orNrazYJtTHrp8FpbQTzbXzSGlEmyAOWBKkCI\nDbFuTYaT4rNquwyPP5r4duGzKBVXBKaFANuKAQAQT/kOiZzvxbxfPazl2e1W\nq0OwafDkVlCMy6CRu4Yie6zpVnbG4+ybWPyZMRmGDenyRT/S9K5DIhoBNy/d\nY/ts0feFvsMgT0JgFimiFuo+X/SRH7VSQS5iCQITC/Yp1bfbURn8e8i3T8Z7\nzEb8\r\n=8R0d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkSAZNoVKihzW7pkY+6iDC8ePHXwo0+xMEHtaOLQkEKQIgdoe6CfB/l8364lb9WNdCDaaJjjDuAVBu3jQzh3tlnE8="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_44.2.1_1597226176471_0.6148542212253991"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.0":{"name":"ipfs-http-client","version":"46.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.1","ipfs-utils":"^2.2.2","ipld-block":"^0.9.2","ipld-dag-cbor":"^0.16.0","ipld-dag-pb":"^0.19.0","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.0","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"e7396bc883ad5a6620e2f7bc32e7baf4e636e230","_id":"ipfs-http-client@46.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.1","dist":{"integrity":"sha512-7aSluSl4BzZXHhS60OgUxr3HYjIfszWxzYNevF9008c0/nfqHDRKm9Q4J+zd+S1tJS0JNTRuCOfGVE35g+jtTw==","shasum":"752346b275e8bc292c451ab8507eb225404b0031","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.0.tgz","fileCount":139,"unpackedSize":454509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM8HWCRA9TVsSAnZWagAAhzEP/ihUMmyMKUCJpJ7cNx0+\nObQ8qtJ3bTe8V5O1MEvdeh7g7H5NH51DjgBf2SUsGoqMSJzBc/0XMO3Nt+Ya\n3VTF3it13IWgFJOhohq6iXgKAWlXHnjZRIhLn3/Zsz6Zgl5tvcXAcM2QV2JU\nvDrT1ftrHb7QMHi4ArfxZEn3t+qIi+7Iab58wvnMovA0Z1hLhcB+n5KWmNHZ\n6aJsmFEP75QnDAYSWXTvxtFFuWCJmYy12GfJbmeAhFcpeh+uguIvcW9wqJNj\nXSNB3Bqr9x1QvS4JReOme34fXtzBhUw0CAx4IrB0AlwSDg1HZeaZ51LZ9lqX\neOaywufBiVBAU/pSqgBneia4h3pK3RCAWf2Z/p5eHJYUJtit267mxa3CCSjI\nEk9xaxI5Dnqw2GuGCGzQZfN8M1hWz7FSbxfzcAAZzCHzkVxjYsHSLkYHa+6d\nqIkBtOvZP5gLkkewaFUjRaYD92SpaJ5L63EyD8kgf3eSznfTj7iasz+xtPJ/\nQnPm6Zjyavw3hb6gPXc/DFWnZy70PD1I5etX0SMh0tvuXnkun2SPTq+LSJ5G\nxTdhoHkWio+spNX2F+fdfELVxidbe7/TmXwKDYifmdXIEV/PgroMjOoSA3zk\nSvaupfpiDUUSuT3WEEiaups5ub7kiNlVVgfTzfpdLqpKpWDmcKCFrLOwyH8E\npbvX\r\n=E/hv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDKSxT7+7tnafcF2MaxRMZIfHRvg2IafWihBTfs2KgPAiAbpqALCVef3WzxClUVasqJB5SoS8UISoqOoqo9CdBGOw=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_46.0.0_1597227477863_0.7239525421497064"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.1-rc.2":{"name":"ipfs-http-client","version":"46.0.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.2-rc.2+5cc0e086","ipfs-utils":"^3.0.0","ipld-block":"^0.9.2","ipld-dag-cbor":"^0.16.0","ipld-dag-pb":"^0.19.0","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.1-rc.2+5cc0e086","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"5cc0e086b036e7ba40b09768b67b7067adca43c1","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.0.1-rc.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-0yX1rQcIQEkjA9JJI7rkGgya/6dcVb1eOp4n6PRGG3Vde2cHyV+Di221UME7gR5m/aPWg7jfoBgpNk/AGQQJSA==","shasum":"681c206f6e6687bcec437170fd549df5dd01ae8b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.1-rc.2.tgz","fileCount":139,"unpackedSize":454254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfO/s5CRA9TVsSAnZWagAA4JoP/0s9a3bfjfz1XZbGZHZ9\nmm69OFGo0E8634VEJJFZKiAbwCf7BYuOSzPPRqqgBkdBMzGuYcveXojUpXgM\nEkiz2to8l0j4FCtfRZucnloLYd2iR36BHina90gfhAXEyukwphLBkiKq88zY\nFpStD79eKvZjCbAe6KGGMS/IIaQbDA+VOXgbsyNExms0LAHtMUfwwh9aqP/3\nq6e2qoUqe2edIF+2MD7hrfxaG9b6iAQxpScezmV4XHjhHtACvUG0+XOyJ9Qb\nULJPlzpWoBzUiFGnqET/pJaOI5HJUJQ+E7bMbFharPDLj5kwrJDPA50u84xI\nev7yvKBdcutH1ULavk0FYxkPHj+Fl+3U7pPyKQRo+gI9M2kuGL34VcTX4gln\nbAmvfmtl+LNi509sCafl2IApX0aj6SMr3Ukxq8kJqbuiqfzjS6P26Gu6cL0K\neeD+phhF9hPIsNOOKXE7AaLYQd5qJXqPL0ybjdIBpmTcQvqOXGMtWt+inu5L\nAy97Va+bu1fY430N9gDjtUHrT4eMxdQTf8G/xpQ0i9k4acdeuDy7DPs7X6oY\nPP9vYdh9pkSHlsrNauasUBkZrR5mkNulvT598SmC83UbzEtXi5WJVuj5WCtG\nUmXVuxCdu5btLstr507+ATqEMkpt1hzK4lWuTN0FLYaxMwChZUh1hJJDdfTv\na7nL\r\n=lh2l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOAHR7CX6Zxg6UKw331o2IIGE9c74V36HNolkUMzE8VwIhALib+PBdQc2ZDb3hcLZbjel6xjizvKfV9Ts/ticJhdNk"}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_46.0.1-rc.2_1597766456655_0.44447104081328104"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.1":{"name":"ipfs-http-client","version":"46.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.2","ipfs-utils":"^3.0.0","ipld-block":"^0.9.2","ipld-dag-cbor":"^0.16.0","ipld-dag-pb":"^0.19.0","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.1","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"84cfa553ffc717d5d8bf94fdf6a306f182c9aee4","_id":"ipfs-http-client@46.0.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-/AK3lpeoxzyagmuAix1BNmDH/R5PpB+VdFtjV6mC57XE6/OoYl5FCmgxOtz/gusfnTLLjm87i9I5+4IbuzVhFg==","shasum":"72c69fb8ab8f3c312573d15f28b93a130a033618","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.1.tgz","fileCount":139,"unpackedSize":454901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ/GqCRA9TVsSAnZWagAARiIP/0t9mD2g9f+gkNEpnl3S\nxuKtefUISOhZK+YeeGzLrv+SBJYyyn8j1c1YZIPmX9bKq0c0NAV/T3oGW6zy\nRhNLDvdYLUT/vjv3qTuIISQalDbZAhYea+lqcTB+377RXrJcNevjAwo2J3EA\nzcfgRWzmR4CXeKUdgiIOzK8HE//CO4uTamg/WrrCSjokus/bOvGCKto9H6Fj\n4vDijTkIVYhrmyPra74pRvSaaM6PxWvKquaFsryJM7fTYCvt5lI7FzmvYlWb\nu+VcOJt4d8tjmM+BjjHJ0jvVlHdV4pmsnzdWqlIZ7yPPHMPZ1myoRUO7K1rk\n7m1bWn4l1jrSO91tiFX5GueKS1IDq3OOUTbSIdzSWseUldVt0YWDUymWf8+p\nmzcVxDOrQUNY5kcDStuYQzHVjS7gnsJPSkMRBAkTBjIylTqa7d1bNp1LzFRE\nvHsbLgjBPMjg6wcJhytQXzgwof4FfYtKJmPQa/nKNEWaWnyKw96BzD9t1tDn\nQZxHRqhQ41hHJMmV5zQkI/Dfpi46a8DGpfr124p8Gda2yivgpcTj66tRFXvH\njNOCuou1kzk0tQhVT3XZk6Q0a55TTZmhjKyvSK3r3hOc4OeC2e5h4KXfI2DQ\n5Q44k7cIV2/tIwQ7PKOTnTHVKhfGqmaZFdvZuFe80wkzW1mqG+7juxquta9S\n4Nd6\r\n=1Frm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFwjtEyE0ADM2TG0Gtt4RU3JJfXP0/7ftY5CUbm62FefAiBF1B61prqyDsubRrJnvo0ZIAXXCeZE8gN2WSMPA6FVGg=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_46.0.1_1598288298129_0.9399276506914929"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.2-rc.0":{"name":"ipfs-http-client","version":"46.0.2-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.3-rc.0+64b7fe41","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.2-rc.0+64b7fe41","ipfsd-ctl":"^6.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"64b7fe41738cbe96d5a9075f0c01156c6f889c40","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.0.2-rc.0","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-s2UNIDfaXaod5lD0+YuvVqihT45tTW7iVpWoJS64Q2lfmmYVVThL7JmtC1YzGxhLLsxcZKuNmYZSOCRcnthbmw==","shasum":"1bf1309739a89c2fd4afb02a3a9ad2d7d703fb5e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.2-rc.0.tgz","fileCount":141,"unpackedSize":453543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRLnbCRA9TVsSAnZWagAAAmQP+wYAPf4YBP4b7MlYgtKR\nLclvWLLHInDtF16vt+Bgiz7mAPZ1L3ZOQqKJb2YxFcxPT70SZcvg3GTF39r4\nysUd2FIS+Qdetr+1Y7dQz6BIlMk5bZnvL4XJFvTR7KAxFYjFwQdGxQ1RUtiq\nqHgWlUdbBvWeytBdFRY4H0wd+hK0InMUWMfyMzBQjr5cbIW9Qfoly24zkmXV\noaJe5fMG4/xvteaAy+L2WK/nI0bCFZy3Cwxrr9TZILEHzutBUGdTaPlUFSAs\noOx5/Rt8TayUeNswcwHwt7l4XJFzPJPB3pGyhEu2U/vdCyoNPPDLv1XKzfSt\n39LsX2APy3Tg8MtFjhMByyMa0IcfzTd+lexN7d3qWGakI3CD/lhk1mEvmUtW\n8U9SpiQxv3IG81gEkQom2izCh4i/GVyoxi8IG6kRLyZoQq6DcNrI7nVfPA8P\nQn8mQk8NKOVqCzEH+651FdeXPj3CnMoL2S6DPWK9w6JR2FwzIK6ttZxy8OY4\nbC8zo+yOYtAIIq+ctmIlZ5KpDvMWisfv3cEgG4Q0TJm7rdK2H7JjAUEWC0Pu\nWpKbFb3Dt4pht220u9u2dLShMtOZVPrHwxPg3QoCZJl2AeITH2BA+su6drzC\n1ul0w/K0sK607l1oi+fURni8Yd41emlbAbEd9kvBDMPBz1SqHKJNM/nedvTd\nc60E\r\n=3Z3j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtZUghCQpH6bzBtXRw/tan3khqlmWbfYEnn6TTBdFRHAiAzr0VDeBbzlruBDy7mx5G9llqhMsuydwucCfg29uR1wg=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_46.0.2-rc.0_1598339547231_0.019366897328998434"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.2-rc.3":{"name":"ipfs-http-client","version":"46.0.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.2","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^3.0.1","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.2-rc.3+997508d5","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"997508d5674631f63aff9a3c0295e57510363080","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.0.2-rc.3","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-QONEH2TC5cbru2ceBwKS0SuccW/uQYi5s0QJyqUS6VaUQRXRr2n32MCptAA2CXWgDELXM+HfiNAA4b/0W4ZWbg==","shasum":"bb6d2a0a53805219e6c380c2ac41b7991e5c9476","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.2-rc.3.tgz","fileCount":141,"unpackedSize":455184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR+0eCRA9TVsSAnZWagAAwssP/RDUXri+J/5Ygk43i/1W\nfnlqXt8zPOtmcksn42JGrpVA+n5Xixbkc/v3Mi5sVLNaL51OrJ632OJZO3y8\nZTQWt6DuTzHxzE6R9xhR5GCoNWc+ssZ31qKwi6mI0u0TVVJ+lvo7MzSPYaRY\n0mc3p96sQadGGVqpSWbZJduAijzAX7cA1m4mICH6FBz4ZkNVeiQk0eTuEBoY\n8Kn/gfjiv4ifwAkbzjJW4RiPyiFURtNcmkd0MEoMvSr7Yjh8iaYGnKN4nrGI\ncmxGs7QX2kq2tlIdtknuF17yHmYRFXYkWSzRVZa+6QmeytsfEhljnsy7ADvL\nfWErEZBx3zdXwtDt56L47dr7Z5TkMXTQcqxDFXiw83H7s/aEv5NOEZxiHGIh\no85l5/xSxsYwnh2QGYcJf1zH/IYcO2+kuSA5TdIYOzt8vXvFkiwGtF36YpHU\nTS+j1t4O0lqrPyGfP50WX7UO0yb+kUFVXuZ8RG21cuxRq23qPoIMyDkUbIif\nC0Aob2xwhgcUZALAuBwleaOxwnhXYQNWdwMb+xth+SwypgB4GUvw8RSKOPYF\nlJP+7vdr8qrR08YH/BAfdZ6NVshSP8esOsnftBDpj2MKHnAFfvubYaXdUWLW\nFJV6X6Onv5NTKtH5ZnTSHtHRB7QmAHFdk34JvbMbnXJ2D+3pOcITa3uojDrR\njZ6K\r\n=VaVM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTqpp6jC9Rg/RXmKuEmymoGDoSYgEqunu21lB5UNLKvAiAYJfLJbXoguz7GZGGbT3T5UUIN0mvev6JhWXZEkLLG9A=="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_46.0.2-rc.3_1598549277934_0.1066136595502516"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.2-rc.5":{"name":"ipfs-http-client","version":"46.0.2-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.2","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^3.0.1","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.2-rc.5+1b6cf600","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"gitHead":"1b6cf600a6b1348199457ca1fe6f314b6eff8c46","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.0.2-rc.5","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-yIgT8ag0jypohOFhJpQkMg6v7NjhIMvAZ/z5sSANDhIqLNhNg36rrlQvsyLdbW67GyLegduCNSmqaCb49Lfy2Q==","shasum":"2a859b58e697d59a9161ba02e4972c4a509b4fb7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.2-rc.5.tgz","fileCount":141,"unpackedSize":455223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT33lCRA9TVsSAnZWagAAPlQQAJFOC1yYSKYMssGyb/hp\nmyVaYuGEgcyMCLAylpgD0rDi1nw6vDntB9GCP9a4TIYrj4nbE+C5RzcISJ2D\nOdRohK9iK+f/ENEmIEe9zWe6F/9reYbUjIgg1XboICurSDNcmkKzu/kiYdUB\nB9ENPEdVB4s2FKFr1Hc0A0U+3MaTPOmvh8OOxo6c+gxaRye1LxEmsjxLjRGr\nF6YBo0nSohRt5FdpXQ8GfKmCcQYUnDcUBw3UrA+mJqLFaD95+ZGYE6jhKByj\nUMLVPoIDNYZHVJ/k3lnhk7+4hd9pdKKCoJqA3TtSA13AejUTnF31b0pBjBG1\ntQi09EIWXANeSNpNhBMObgbdKNs2eoNqc1H5vfezAvvQhgNaq2ECfQ8BBRmd\nm8rA8c2gXYuvZFkmJKLLHyK6z9h2UYJI3XTKIzJ5h29FFZWBtxo4Iqo7dSDD\ncOzbHh8g13mJfi7Y6lZKRwkGovbAsQlHjuzJLwlhevZR6OTqfV1NXG1O2Lyb\nlLSDcP4RsPrGwKiLbc7c8wNGeaSeppBxMv7Vrx0GKWE2r1vgQQixRQsmGIyO\n8M+78Eg6vKMBYDlN30jjSNDZutQI6CdGakpn0xIYZwoNYh/qVihjAZduYhCb\nUrKbsLoIfbexfFTGoLNHM4MBeQwed0L92Q/8DDqUqv/e0/mQWVIri4+4zNr2\n++5m\r\n=LMr9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8ygyTK4bmEwQ3vIXeTtOhKb4Nq/ofNdvGJX9zgKVTTgIgIhSmKBEvn+RLvBdFErxuOrSh6i5/3DdZ1RXLHRYD4qc="}]},"maintainers":[{"name":"alanshaw","email":"alan138@gmail.com"}],"_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-http-client_46.0.2-rc.5_1599045093181_0.27325205789751905"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.0.2-rc.12":{"name":"ipfs-http-client","version":"46.0.2-rc.12","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.2","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^3.0.1","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.1","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6816bc64ccb9bf852c2b9a26d9ddd19b9439dae6","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.0.2-rc.12","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-T2/Dqn6pdr3RFsgC9iid39AD70ZeUlj6fyOZezCU4DTHmziUtyfz0UkMAHmZs9RN+EBSwOrpnl4rLIb6QLT3HQ==","shasum":"e8a22f411d726b0f6dd67e3a9f0f0cdeb22dcae7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.0.2-rc.12.tgz","fileCount":141,"unpackedSize":458968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUOiqCRA9TVsSAnZWagAAHjkP/j9Hjld5TRYI7cqqn4D5\nziB9Vg7v0H9SEGEyYsIW+1y8ju27T9RFr7q8Ww63S4sXCXLgdBaYVQnQe5g9\ndgjtr/w6RSf1iQ8zpkX+9txfZspMXl2fCQl+JG7K8vclKfRZZ0Gm9oJyUhcr\n4e4SaI7RC7FITKj5ZuRnJBxHYRwDbOdAV/DDvOTfp5KytAaaoD08bmCnVL20\nCZsamBzssxUgUn8eSa3B8QWPn69ihPqJmU60AyR+u9xs4luj4ASzQz8gmm+c\nKHGJXIb8hPWpmsIprBsfn516OYRikLoryv/nvjxY7mo0fmmSh3cBq2wWH2jS\n/kFdOC2UGR0P9Yi3T9AR/a1uc9ENAKt67eolea8eMxPM7IH44+WVmBybGFJa\nYlBCEwVetT0fjt03URFXQ2eLNdPkT3Hsa88x1XbFwJPO/6AbXd0opLjstCVY\nBYnswzTJRxTbtJ2eGRopIlaENaXLqZqrj9ER4OkVS+NeJ36oieqXz7yR7eL7\nxdUTk48P/ZtsScEdbcqxcRy/u8MWaZz+noIx57tq25/k+DI5UNqVhV7JgEAz\nFGhwQhZx0FzfM63smmGsMjP81HRkVKBcpPTai5nXFfCXjyZt4EvgsnPt+9Gt\nYq2sjWH6KKlzOa3J8iZ/w47CM+jswJBBgnxi/7F47fhf5UfLcPmEyUkj6b1l\nKJPQ\r\n=fUr6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCllyMQCnbIOZIi8qs65+KT4yWZ4EnGmQ6de6xD+82S6AIgKivHtQdrhx+RrxwoWmicnyh8UyIutyjmsiiNdahIOME="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"alan138@gmail.com","name":"alanshaw"},{"email":"mail@daviddias.me","name":"daviddias"},{"email":"mail@hugodias.me","name":"hugomrdias"},{"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-http-client_46.0.2-rc.12_1599137961953_0.53601022568823"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.1.0":{"name":"ipfs-http-client","version":"46.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.0","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^3.0.1","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.0","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5ea027cc1d92148210e4c42d56b583078cddefa0","_id":"ipfs-http-client@46.1.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-UipNes1Vk+8iEe08JTmf5+ThP/x2WCv1PGm3zxLXYqFKI8DHGCtZglO5hocrT7529byuU43FwDRy1ALM6z+aGQ==","shasum":"e237922bec30182babb6089e8be6f0d4513131c3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.1.0.tgz","fileCount":141,"unpackedSize":460988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUPs/CRA9TVsSAnZWagAA32wP/i0pHXee6YjqHVCXOrcw\nW9/iqwriOfQTtAHxofZiKtSVeMzsjKo0BRNSbs1ThyrEkR9zpSEelsT5ivUP\nmImpwTCsLM1vfMID75AkYRujh9gQb1P+1IA6WtYb+tJdCwV4VFJYawl4UKg9\nE2Nv3e1KJ8eclacS4fbuoB8zYptmXMYIT9tI1lexg+hCBYc//DRfNQp3Darg\nMVt6m23za2UJmZnKygjmI/f3mdlXmBZw6uSGYnf5emJPj7CzQVTWf+Q+eazO\n4k46qrt+WgUjBXB/jmwB0+GUByTB52k9RrH7V9bZUyfqDHxaABvBDIU3H3iK\n/1z9t2q/P5/rw5VN0lKCT4FW2SVHLHrvRGm95d4yxnplmVzjF/1dV1xtjRkS\nJcCG+/iH+k4pPOGKwV7a8wKjamn0j33fl6RtMvuYq1pvxcryb1jqWcWsrEg0\nmKRMb3ECB5pf1AYaTte520ThbqfJfjQrSMlABsUNBADHTOkRxB5yudjLvmUC\nUy2wMAjmbdyXOtOKWE1rvOE96mebdO/NYpuT2QpTUCndltxuEP4gWrXMp2hZ\npBYo7d3PXyk/JydxEV2niCF0uGIBico3xNgX9mNC29r933n5WsySfdAodL0K\ncRyja10KhKj1OKuEK8AamKf8xn+C+/TX1qU+xviVFZ/6oOV83b66Apns63um\nRhq8\r\n=RjQt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhsiGx4drAgOD+soYIqcrv2FRrG8dkpsJDdrbcM7JjGQIgPbPXluDlXYI+vUly0JgtdH+kZS49dzvLBpbfrtz0R9U="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"alan138@gmail.com","name":"alanshaw"},{"email":"mail@daviddias.me","name":"daviddias"},{"email":"mail@hugodias.me","name":"hugomrdias"},{"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-http-client_46.1.0_1599142719234_0.8450698256552813"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.1.1-rc.25":{"name":"ipfs-http-client","version":"46.1.1-rc.25","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.25+6b7796af","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.25+6b7796af","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6b7796afb534876d7e529788b604b120d4114f25","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.1.1-rc.25","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-/3r9hGAvrIRCZDuwZCdr2BMje8oSMWsofr/CbDnEiLHNTtiTXA9iXteW3yJA+H46+LtQ7/D7FxRbFFgKNOqdGA==","shasum":"f30a919a5586076f62f6de69354b9b9c3f425599","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.1.1-rc.25.tgz","fileCount":141,"unpackedSize":459153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUk7UCRA9TVsSAnZWagAAO2gP/2DuPrs0gIB/QTfkJiu2\nG1tqLh8RdxQi15nOdpcueq10rh2dx3SQZ5HcZeMPAIHGGxCaaOwa7I3DzzEH\nKAxxfjpuifHv4LlNxPXqGxizZnBRndyPGngJv0qWgZO5XJGGdJR3PPHj3gCu\nwR6X8LgT8MhwnenZAhhlNhW68xScjqzurzsu1z3Ydmz/SQXqY3dVh4gffGAZ\ngGJWrfSnlciRc5PlYXLxFcy/N50ca6nziWQ7HRzEcCiD64I6gBehz+zPkO5V\nqZqiU4Pta55pnqBSz7n+q611OOfHIpO3LSBK2rfqVC5tpNFpeor6+rjb3pPG\nSMFr9TiwepX+zQVGubh8gNc5tl7vnt6JjQdlPFDfitA4a0pHbyHWA7hHRFa6\nXY/XTsUBsrYlLkEn9TEigYcZJCxRFRsJpBeQiBc3XikGhFUt4dmbuLzATgYi\njT6tOz+B8ozZByGh/GnI9TpkYSUg9T86ZVEVUooyEY1h1+mcqNIrYrBaSsik\n/NWesMgqjvr/BQwDAIrugCrKONQ7jYpmqXj5hBB0kduqowsOLw59TRhZjKMd\nDR+eO+Q0aF+4aq5Hrw8X+P+gQqLACqSbHQDZmWKmel8SEa51zvbuJOMLh2iB\noUr8o6ycas5eY/BHSPpAGMueQr4m9ywWKmweSdwFXUOT+Rzq5W+YCXC5waPu\nMuZh\r\n=tLp4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoIT7pM0EpQdFMQNiQ3WMxw/Ee/XyBDGBINQQS0wRPkQIgXgWA552ljSswUDusVmRgQJdbhxcHYmdCrnbIq3pcxcE="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"alan138@gmail.com","name":"alanshaw"},{"email":"mail@daviddias.me","name":"daviddias"},{"email":"mail@hugodias.me","name":"hugomrdias"},{"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-http-client_46.1.1-rc.25_1599229652459_0.9540936174896999"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.1.1":{"name":"ipfs-http-client","version":"46.1.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.0","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.0","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"67d048216ca391b9d9020dab35ffe7a46062b93c","_id":"ipfs-http-client@46.1.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-8E2tKdLke9Sd/7burgfokhIcOnQoWAjWrYR/i2CYC0pBTkxHeKcEGUG3oQ1cMPfyWVsRqDG4QskYRYppjsBjHg==","shasum":"fa151560d977aed996de5647beb77c938068ed04","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.1.1.tgz","fileCount":141,"unpackedSize":459642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUld0CRA9TVsSAnZWagAAwlgP/1p2idvP9jt1vyUkDyEk\n4stgHEW+FrOGlr/385uIw/x9fq1HsetMU5VUETX/4/3CY9KDn/+iRaXs6Qm3\npNDtilYslOZMFYOj7Za0bgjmDx++NTwAp+fKLmge9ZYXsnjOlNlCWklu2yUt\nSmdupPjjx1TwPozPrCwrRyC4eCGl/5OPJTnTJnN4IWqMplB6Mgmx8wF7+PRp\nLhGdnFMSDiVMzyFuuwcP9YpvYDahfMHnX7FWHldNGvu9mupeCgCX91LEtGIm\nBlZhUD2ikn+9etoYuXOA79wK4Fl20GmPYFFYtfk8BkUeB/PenGul83cSP5Mq\nbVY0zZ5gsfM4fUi+X7fYlGmn/ZSVWHu2vPabp6vQmvEqBlZRSdjUvjqdXF8i\nBu7fJIPhXh2PtW8bZLls5xT8PTOAjtj0oA/u6OP+vFpKjSSUcRFYUq+FTlyF\nUmgfjM6bKlJXXs7hc1tmptHpDBM55yMEZvQLKGy84eNOe3XjSnXr+qOVsMAk\nV+L79t+4UfKykexVkq/7I5qin+03LadKEdIw8RR9O3aqxdqsx0J9HWVvQ2Lc\n7T+EfUVjnt58u10PRZ17MNCh4h+Zwl40SmxO8EBX7BcMWzqbzE2udLqaltJq\n2cJ5fvx+tTgwn6+KD6Ljwn6RTLfmTluWjjpEqpllbFoa406vg7GghGQcgIFS\nfybP\r\n=K8eN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZx+wnIxCUutmaBzP0qpTciZk7dzY+1wSX7/vyX+uZUAiBbUq2zZoeAQME4vzSReqGFxHA7aE5yJU6PesidyNQh+w=="}]},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"alan138@gmail.com","name":"alanshaw"},{"email":"mail@daviddias.me","name":"daviddias"},{"email":"mail@hugodias.me","name":"hugomrdias"},{"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-http-client_46.1.1_1599231859922_0.7037682056154815"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.1.2-rc.2":{"name":"ipfs-http-client","version":"46.1.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.31+d68bf64b","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.31+d68bf64b","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"d68bf64b6340750779fdce1e3ca47e8d6fdf8a16","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@46.1.2-rc.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-LrDocnpg2M+xaK6ygvVf7TtEuFXwwjp+B1ZLtn1Jvmn1TJzRf5rN9Kheye3TnVcSwk2G5fv6AtDDRJ4yP2zqfQ==","shasum":"543e890fb07cd7d765eaa18d10b93e5262288eb8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.1.2-rc.2.tgz","fileCount":141,"unpackedSize":459251,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWMFlCRA9TVsSAnZWagAAEfYP/3aZsvrh4H3bTtSLdSxJ\nMB9spxq9Ullq1t5P5WFpuze77YDuzZnsyK73OL9S0fQNk1op1dFe2rCtcLNo\n4aw2Xp4fNRkjOZLlwDAH6PExON1FsdTtTw4Uel0bJuFliw2KD8Sf6akLi8vf\nexonjH0Nv5IzR9lhHQ7f8QYyPH1raknZlAhTKXc/kxlmLkn1O+O8UsLB87U5\n7EVMvAXPqzl7NhFTMWLISQdOw5DJhb6boDXBENsHPPQ9janAUHexTtWdvO2R\njdsS5GyrKVs9C3YIWBqbGpnTH5KH6tTTSheBUKt9mfZQvrh+E39S3G1qdga0\nm5FgUDKrI+rOrtBujXe/tz+VhLUXsfanD3pjVcuuKBHaFpG+GTxGUj0zcWJm\nYD9/qadW1SR/RxDgSSqLBdMos+F6EP+s+M4NBLyx/iZPsdGmcP2YUje8L3vQ\nIR4ib6MJBeFuWqTot7G4uVHF8ZXLOIv0IzVZSVDJwiSDcGmOhCQ3658kKQO7\nDCz60UOd0AVNjmG1vGjwN+wft60SiMpTAYD7vNPTGX/1RvtBrlu89dg3A1nR\nCl+e+uMrIuWL+XfaQ4WdyuS27jj58N5HV+kFyu6GWfwwjaHVMXATzDXatoX4\nyzCcaK0KOzxaYNYAh9HUWdH1OoV5uZScYE6Gx+uFgQhjDMSSpHTtycFlj2//\nMBPv\r\n=cKqJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC12aRq3FeRzXmxs+S3+yx2z8UWS/or8jsbkxHFc3BpJAiAzV11ngJYpPaEnkQ7FAUGHRjrQagA5B6PAkDmvU14Vow=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_46.1.2-rc.2_1599652197000_0.13105603629683293"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"46.1.2":{"name":"ipfs-http-client","version":"46.1.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","buffer":"^5.6.0","cids":"^0.8.3","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.3.2","ipfs-utils":"^3.0.0","ipld-block":"^0.9.2","ipld-dag-cbor":"^0.16.0","ipld-dag-pb":"^0.19.0","ipld-raw":"^5.0.0","iso-url":"^0.4.7","it-last":"^1.0.1","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^7.4.3","multiaddr-to-uri":"^5.1.0","multibase":"^1.0.1","multicodec":"^1.0.0","multihashes":"^1.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1"},"devDependencies":{"aegir":"^23.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.139.1","ipfsd-ctl":"^5.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"}],"_id":"ipfs-http-client@46.1.2","_nodeVersion":"12.16.1","_npmVersion":"6.14.1","dist":{"integrity":"sha512-/cAavPHrJ8UqFVlYNWGEyGCU+yNrhDIdOHkB5VdUscCuw+sNCYaPROdSSJTpU83GlPA3IgOj13JGl/1N+xjCIA==","shasum":"635554921054523c1b4bc0f32a7ddea55bcf35e2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-46.1.2.tgz","fileCount":139,"unpackedSize":454937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWN7jCRA9TVsSAnZWagAAAwwP/ioo4TYQrM5vR7k7odJW\nhsKI3Mt7A1BEHGlq2uVL2F1cxVbM0M3coHL5CXgZ1KiyNo5rFabv2xZUlFm5\n8iHHZBDU0CLBJQcdpwMvlWzfKlHoUBY2HswyyITZRe+9E0TVZOH/VN4guc6L\nzcGBXpl5UJ6zlbucEfAqeU1cHyB9EuYx0Fz2ns3I+5lrR1YDkEPjsR9NPYKB\n0Vu+mKPRWefuKaAsvFNLHmNNZLaHGsD7X3ohc2JCX26nvogB4Wx7uXs1/QH/\n6RO+RtpTaWQd4rB2mbgWouiOagvQsUbCl3qgQhDpzULoBi5Ae/3b/QeYtfxb\ncinMQDIjc/IMIcZyMVeLSweltCrLYKE1mlvXxlFOQdB83yW7vITx9YqePrnK\n2rbJtLM8+/9tbtvjas8YwzOynCbdaPrBWJ+G/RN2cAi+qez8SHvkgd+yZWZn\neVUqQ2PgvN/fM23LwD+LN1f1PKdf63nmEjvyLjTs5WCFHBcasjqAAg2fFx0y\nmy7FMuiLQRP7Z4vwQwn0/YuFWhO52S0kpONRwtCQiq2zTBOyI9RRtPwvm2Rq\nWf3JVmWwwWVGphGbbPWk61RtzQOr/i1j4nmbku/HVoZF4WKcD3W1VO6JUL9c\newqvgo45DR8Fb+GUo6BTy4Rmh/3btcx0pLPIAeVZZl7/BFlX/Fg523mAdWvK\nry/x\r\n=TNl1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD85vVsePchtGu6J+/09vYr4p9+n5h3CBq0X3ARFT25cAIhAPit/LUJnFEIkl6uJ73w+E6hlFlDd3e8ch/wvOhCaZWf"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_46.1.2_1599659746739_0.0742171458972285"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.0":{"name":"ipfs-http-client","version":"47.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.0","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.0","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"_id":"ipfs-http-client@47.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.1","dist":{"integrity":"sha512-r85G5TxBMQFgYBBJmQhI6M/1tD1b0MH8r4iqcvjliNuy+vIMy9kkpfUI/YuaHlOC5muQOzzap8T+8wbDFp8ReQ==","shasum":"bb8fce20fdf39009e1975600bb05a44ad329980d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.0.tgz","fileCount":141,"unpackedSize":459516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWOEQCRA9TVsSAnZWagAAkWMP/iI9MvHGDc774RteDDyr\nifR0zdQhD5hQDV9qURNtR6zhft2D9zKJiMaMLKY1iUs9/4gvzvxRumvfwREb\n2xOdiqlHTCVN6v7eJN3Qo/HeNlGNRfpjvv+qSiBxyI/KdDU64dVtzYJNdKfV\nN/ylhhZKHfeq/o4oQxqnHTp1Yb7EhB1HGmUlAjAbfonjezNl8aVozJAA/hv4\nZHSdoxOVdbk2fktiz2Uu3LIyzpcDxPO2cgsqboLpwWNUNBrFurafaVlLTJ63\nt8vOnAY4g1MRcayJdsm4gLkwbW/+NHTfS6Os7aUtHcCMOZkfFxY+vTfZInBL\nf5FWPs5no74b72gZsGl4FMukhF/rQuAfkCker0ZpC9YczsbzapfgPpsy9NYr\nhxw84yTxSsOOrvsRZOKE7+HFNqX4zhVOVm9Z78mdelouk1S9nDe0L+Dm9FBh\nfb5kdcDPz4Jg0RGxX3jky275eBvOAyf3noDe8ggL+1+FTKI5QL7dP3uGNn/I\nwDJdqq0LtR4Wa9fmfefzxj02GHJQwo13/qLyKVb1dGUTr7pmLf+7bv7POk1I\n9KY0S1U258Ba2IZlnb+oWbVRGTnvCxvvRiP2Hfs4nlG4miLlCbljGk74ZrpS\n0ea3btdg4H6jF9s6TD7RpUQbUh8NhgKKwWaIrMs7uwol8EpnnXXrck9ZlXHo\nPUTE\r\n=B6aX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCiUoTWx4FfSUQB6zhGrLPuy1vuiGkMiPZO0AkZ69+qQIhAKAnfkFX8Hagk9LNE7TClyCIynUPouDkiNyeg33oNaMF"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.0_1599660303700_0.9112465479434735"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.1":{"name":"ipfs-http-client","version":"47.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.0","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.0","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"99c762ba6b3b71e07596b2930c09fb143451aafe","_id":"ipfs-http-client@47.0.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-IAQf+uTLvXw5QFOzbyhu/5lH3rn7jEwwwdCGaNKVhoPI7yfyOV0wRse3hVWejjP1Id0P9mKuMKG8rhcY7pVAdQ==","shasum":"509c6c742ab405bc2a7e6e0fe373e19e9b85633b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.1.tgz","fileCount":141,"unpackedSize":459752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWOYZCRA9TVsSAnZWagAAEGsP/1IsiJw2Nn9PCMPiS2Je\nQuaQgllF5FXXKlbG+Cp2AQZoZtE5deE3izAvdJN1P2/tMfytaTCmGEA/OQWY\nSkJmr8mzNMVzcso34vhniMMwaR1wkjB5zS96BNQaF7UDO3ZwZ2CjBMWkWKHv\nlb/FHIHj83+LYbmHudaVs9a4BGu704c/HPRUJGHN0g5ru38YyognQ85GqE8b\ntGBFfbUwmAO2uaTUBHzbGVf8jkPJThLSHxHPsU1ewLSQnYo4jOF/lijJVLJn\ngYO2IMgs6yR9wNc54cC+gJ+ThDe3FG8t4fN7PXh5c8Gpz3dxcJKmqRY5B3KH\nHwSb1gtMxmn9onR2WQCd70W6YLVytiUKADkGVP3QMOfCJnzX6jb3HpxxTDk7\nIpI9EfgY1NZqpJLiU/Joyc3sZ6QemBFFh/MxhwcGxtJmhnCX5n4Ll4qlhvFw\n27W8cgQbD/Koj9/fttWhF1/ZY5SX6mUBHK1FIFhY9Qh4Guv23SnkZ1RLxtZu\nYnKQZMxqYIaNIo2RulQhv4ciawv7nMU1F6TkD53cJw5QwUC1jSkn2vB/ULyB\nBis5eFM635R3lC1q3PymXnHgfxbV7GZdZLTLKuRaJi1QkVnq/JBiwCRFcr1z\nosYxi1AYNnh88hMvxPJSYv2XM9kzuzXCh7rDHiC7omFmb7VZAU7M9SN1sILW\nj4iV\r\n=MfBJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIRLzTZZ7EOHD4X3PfwsZuJTX0TOjO9Lfq6sIQbi8bdwIhAMOKY8397oOLyWgJiiEsC1Cr1XAOtALb41Eec8s+r292"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.1_1599661593019_0.804935624775831"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.1":{"name":"ipfs-http-client","version":"47.0.2-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.35+867d6bba","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.35+867d6bba","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"867d6bba8561adbe6ff67221472f0cbffe4e1801","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.1","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-Y+K92WJwOVyPZP2MJo9fKnZ5u7nFomjFujfYfPOXjYsY/36rFohNaia29TkHEY9xYCfowqlGgSg0BOewAXo2Vw==","shasum":"0c07edf2ce3866d67735da99e29436d3c915460a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.1.tgz","fileCount":141,"unpackedSize":459430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWeDNCRA9TVsSAnZWagAAuvwP+wfmmAHrrAEUyl+KlNMs\nNWU90cuJnrXmnP6GRJ5MTa937HeK78XU3PeJUYS503GronyJ07nNm6+3K+oA\nNGvkqk0WhRT2T9v2AvrBJMnouivaDwjTeW97K8wuGpo70oHWFv7xZThsgUxW\nRvm56+bsbLhhNQY5T3NSPLbJqj4wMQexR9qOWN+2q3+p8LK5m4NVtgt4/VDd\nzg0Laj653Qjcp7yDqiEJ14Q2FmlHGVFLiYL5U+gxVsJj3/Mmulr8ZcUAWqYq\nOd3xw/QMz0LenhJHgHxd1oH2ohf23Ac5s7c+0y4ocb9VjwDU57GKj6NfA9kG\nyQY7MgwyTXHXbA6Zqbe/6ndwF0bhgIlq4F54SUs9gRSqFXrabjr2GJKAJutI\nK32DzWEJpJ/Laem73KpqQ7DvAm0t7rHHXeogUSgfHIddEJup/wQWey9LGPnk\nQ6Q4Xrr0pTSdkVeYwhHASeYTXTNfLqLPAu2cbb1QrIcQXxRVGZ5wK+D2BGrz\nLVeTSaU6O0dQ2VgNppwcsrMI17dbIMapam+dyLvNLSWolMUJxIYL0hSDWhN2\nullp6/7OYfmzWrkIgDL22//FuohP9Kl3Yc1XNmqGSmC1Cr8BPbQjvCjZCU0u\nth7LtzWC6wt237p4OSNoh1tTSKJtiT9gIUu8a3d9IcbDnjHqll1VOGTERLGd\nxWJ9\r\n=z3Tv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgXEC+UScaSdH7qZJxZtf3S/mUpy0i5SP45pn+LyiuzAIgRZQo2X7fvXuJiMxqdO9kzW6RfhUyBtEhz51TIZF401c="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.1_1599725773361_0.22809418075736487"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.2":{"name":"ipfs-http-client","version":"47.0.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.36+49628a6f","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.36+49628a6f","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"49628a6fe9879ee8beb1eb97236de05fdcc74a5d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-PZgjEAgY+qGca7emw+S4wFZdavA6D32tTOgvmOFpAid5OQNRP5Bz/WgfV6fR/utIdHF2sxxtm6PgHpEDIUiDTA==","shasum":"29bc65f36b2a6c0d5922c28ac88237982b99a297","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.2.tgz","fileCount":141,"unpackedSize":459430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW5PLCRA9TVsSAnZWagAAd1YP/3OL+E6BMRt2ZNzzHeSC\nuSnDK8OEZk7JcvqaVjfURMyTnVthv/mpwJDFIzi4EM+f6LIwe+O0UMiaxhUr\nfCMzO33imvT37WiYDjq5rFXNlQfzoBZOCaC/sxR7/UJ1gOih+wRGsjvribxC\nNwa4xPzxy9Z5TxAbHs2GbpDOjcgWymeSIr8o/A2C0PjTfTKC5uu2vvZgBEq3\ncaqBOI3N5a2pj+st+TOaNblX/CzMF/PexIC9yBcXM/B5x/rnuvp13j77+UkG\nr7uoHp5UbmSmFxbpT27PJBXTm2CrWEWRk5vFsztIVWeSBXfZfOL485RgdtZb\n0XXPnfAbTDImU35X3xX28GgtnJbHwxqKa6FuQswW6vuTS7BUqpmZkIyCKUn1\nDw6C7cbhYV7r0rVQG5xKAfVt490CZKDfJgJ4yKXOfp3kyCdHpuX8bu/Z0xs+\nmGP1N4bNX1oYEKKHaazN9YaHhOsdp+RP26q9xemJBnIfTOxrm4GaSBU0G97v\n0pUJOVbekdgo1STFUfiiE9v2fYqnJio6HwLxapngDc3CtwwzJnr8JFH30VOc\n9tJiqUBb0j9W52nucXMwqB0l/mhTldaGVcZYDLS14AG28QAPbQlLg38P72Bk\nzCUK89LbmnbgTEbha1hgu65zqAO2SWfMO7aCpSHsmxy4StDQh3uMmQ3rDvUp\n9lDm\r\n=yywk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbAMsNUTWJmnY9jLfA6NGCgL5baqdQN2p9x52YO7OijAIhALfqGmg72bjlITPk3YpE2zoUqsfCjVdGKRdB64Ki3BB6"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.2_1599837130868_0.6321271500888004"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.3":{"name":"ipfs-http-client","version":"47.0.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.37+420cddb9","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.37+420cddb9","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"420cddb99873a27e4afbf1973c7f06c5415fb883","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.3","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-6wK7Y1B7lyVXOkoJA6jey2opgUAT1lxxTmKNXW3CVBzNE3zHCz2qFKFgkfeBgexl7lBLIkr9MPKtooUDkZCAPQ==","shasum":"fd5d597f154dcece403bcb27215e853b4ce7c8fa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.3.tgz","fileCount":141,"unpackedSize":459513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfX2tiCRA9TVsSAnZWagAAMiwP/3P1lkHSVkpu06xhiRSP\nmWfNrjoebXml5JGq867aClfoBFblSq/VNdSzIolRAnrhwasVTNwS2HaSZDJW\ntXSUK6d2G1JIEmEClqaICiPzcoJuDsiOdp6HOzRRWUicK4vs8jhC/R0iGisL\nTQ4vckYZNkS8To9AgJ5WpPF6dYv2eoG3aVsP2d7IEuzXlF0HWvlae/e5XDcI\nPeFW3hvt0buasXu9Z9wLDzsMlpERQ5pi3fw1rJAL4a39vmWERuyhu9/fqoc6\nbHjLr2Dc1lZvUoG1d7jos8CY/6ADgAFYU+rb0yzJSOlpuPH6Ivkkf55UXaXy\nPdC7z68/54avRMetkZTHEb2prfTKL8bmnqf4Ev3Z5EonWw7LWjxkYmYX+ULt\nraW86ae/oh3JCO5HwDgQm05RDFknm5HMhPPBfebtXEQYsUyOJKZF/xjkM6St\nHlI+XjpKeaBt2x2cgeLyN5/bPv78WIcNIIcbO28cDiLTXqjICcVoZ2yz9KFj\neu/9+dd0sQh+3jQ4aDKrI9MbFAO68iV1xwgoGKQQU7SEfJOcwLK3uVDV2bNn\nkgZFl9eMSfzN1gyCdq9sRRiCrMdGZCxsNYxDSXD0CRs3IUSpf+G9bQt8cv3M\nxBHBIlNiVT1qVZdkuT2dGyw1fA90Od5RRJmZoymR6JjHAFjeV8EVJd84Q8wG\nxTh+\r\n=B+mF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzzOZ5JsQTmM5xKy0zvWkyQl+Q+TcMh6B49QcziJdIzAiEAu6TMysO6Y4tcnPS1wNB4HgLclBINjRbmZZyC8UQQKxY="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.3_1600088930160_0.5633688959665994"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.4":{"name":"ipfs-http-client","version":"47.0.2-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^1.1.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.0","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.38+e8c38f48","ipfs-utils":"^3.0.0","ipld-block":"^0.10.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.2","it-map":"^1.0.2","it-tar":"^1.2.2","it-to-buffer":"^1.0.0","it-to-stream":"^0.1.1","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.0","multihashes":"^3.0.1","nanoid":"^3.0.2","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.1","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.38+e8c38f48","ipfsd-ctl":"^7.0.0","it-all":"^1.0.1","it-concat":"^1.0.0","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"e8c38f48611a4628b04fce4f3b1feb628eabc121","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.4","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-A20wED6x/cy75xfFwZJV/SG0Cq2Myr9GR/84gMRCwY92Gfxk9MU07X3nn3GlxqlyEBVby2j3Ew+iiwLYAhStKg==","shasum":"02ddaa410686e373c8c1eb02293f6ace88fea426","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.4.tgz","fileCount":141,"unpackedSize":458677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbfVECRA9TVsSAnZWagAAW68P/io6KPwIMZPrlusJbD08\nCC0LFcBVzSUxIELVMRDI54MkN6/l2RTuC2EzXSDPziJ5AV2qWLMmzHNJHGi8\n97mnvzzzfMJX+P3+R/kIe7AOurhqKl3ULazkNefQJYq1i55SfLESG/r6fxyz\n87ywzKz3qapyH2y0+PltuyKhpp2tzu7HZ63MF0duVF7Tgp6igmOSyLCTi1t8\nxZHDFL1xqFtp4aexmvkBZ/64/f3qninNXsndHOyMuRFiccpCG/rmihMlcQp6\nSHTzM7FpGJW2Ctl+UBUyoxeX/fXEN6IdpxhIku4qhJ9+NSf+26KrarhfDOhu\nASp63M2/DUV6ibKjXBGWg4XTAjzAmZlx8zbazUcr1Dfjd2LedT3/50p/6FVJ\nBT6I7LHzF0QHE5fb8gyEwLiQGx2Bi/nYW3WgaOTJAWLnTAmWu7QDhm6dDSOt\noXtl1IyKKa9rWShD1037qvz2zK6KQaoH3c5x5zG3A/mYhtrR8fvMyeaKV/0U\n+qoPm3Csqk2ikCLdQ+0g959wbar8y2Cx+hIRv63p3LR2JqqQYlqrVUhTf8JL\nzhxcXf1nyK4vbNBzlPPN2io1cmw8UqArYa7GczduEFIgWcJa5q0VVB3gQg6s\nkAbPoW5wrFxyM1Gbw7FPfe4a2U3F+P+mvRbvEsY/2Ls7+0dgTbLmOTdng7lk\nQ3kp\r\n=GW8d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqpoaII2TorycT5K9Emy2xLAdvML9dCSrcDUgaTNhNFAIgO9acGkuDuycOAOj+qyZWIayeUvwbAcAEQh0i4hIhgLw="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.4_1601041731498_0.05867881553566212"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.6":{"name":"ipfs-http-client","version":"47.0.2-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.40+6fd99c19","ipfs-utils":"^3.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.6.0","interface-ipfs-core":"^0.140.1-rc.40+6fd99c19","ipfsd-ctl":"^7.0.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6fd99c19c0595d1d6e4c3aed698c76dfd979a438","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.6","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-0eLQT0dq9giYvfJEMRGqx8YjvjQKEecsT3yQFQexpFNDalxzkakGkX+ZGrGu4sKxQ8G8tnAp7vKsdgLH2r/dKw==","shasum":"f3a4487fbcfacc139a86869b6607fe0889a475ea","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.6.tgz","fileCount":141,"unpackedSize":463162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe5t4CRA9TVsSAnZWagAAWkYP/0zxbx63lrxYmNLuLohq\nHUCoafE+dGfsg3li4AgabeKsOA29YwrzRSEfdHgkzIiPYhfvCIesx4jzyPMo\nLaEb83v5Dh9A8W+EIRTLAOeMziteOCYyi+igze3rPFJhmCDL0Px3H106h4Mh\nKdI1gJTRm3hXLIlra1t97mTYC06MYjt/xSwQEdXOl/TD7F/OubC0Jc8nXny1\nkof2oQsmgTXy1eHRV/vvvrP3R8EpzB1j3/VTt4QM/gg6naGrOFWNjq2jmOZI\n0NvHRdvGExJwmHaVfMn/xKFFiK5stmoyNdINZkzIO+cYwP5HXeDf6Tepdi/R\nAGwmeigbgiE7pCqsRNHF8br08WQto1mecxmkGi1mAhuoo/d+6343eWDEtntV\n111bUqJy+8p+kkA5OTKPSwFSyV1ThO1cCivmHd40UX1zdyTR0J8N9VNZUdYM\niVLA1nhCvy+ntUqGVOI/ObZihGFx9Wgr6RGJiPP3T5AoNfS7UvQB1VuAaoQU\n2kAnwh+LK9xvG6YwQbkjuSaxGkNkLs0McOrOvMLx4O89bkhisBZzjhJikH6C\ni/XjLR1YaNjrnsDyAhnwWm9n8GpmGyTKTll1+XZ8YGBUpfyqdwRwHRs3yNGw\n8c79W3e2r9oUTVQaFhKi8+Q65ywgLYcruYnlgQAeodU1yrFqKEEA7q9JA+mq\n/viK\r\n=48YE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuE2P89SeopzGpk0HdBPuhNQ0PWHHrQUs8tdwMUZQCJAiEAuwgIvqhNDiNms10mHA1XQOJJCN6jaWv4Ckg2DC0XHOg="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.6_1601936247769_0.7250469058852127"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.7":{"name":"ipfs-http-client","version":"47.0.2-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.41+0312c415","ipfs-utils":"^3.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.41+0312c415","ipfsd-ctl":"^7.0.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0312c4158640b6ee9640ace9d91d7469df7210b3","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.7","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-mDaRawGWK62xx9aidY6d8gDZBLA7ViOat5EP7+eDjUZ1zG0rTbYIXdCqTS0Bl56KkVVbmaNdBzDQnMMO/cHpxQ==","shasum":"122855929bfbb4fa8a51734f9e7b95548cd9d645","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.7.tgz","fileCount":141,"unpackedSize":463162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe95XCRA9TVsSAnZWagAASPsP/0rcEp+yhbDzwo06yoqm\nvBZMJhYKy8i6uChHKxo6RcGYPHdj6sJZC5PZhRD9NtMzfOVEW1usifFOg8f7\n/OKJw6sN2ZZMwZASnTfD3ApXar5fYbl5Tx6+zFI5MfUpXzqZcANSMBDSPuHQ\n1orD/XlWB94UckImfpY7RtiCCaFZtlRtvfZTRTakvwaeifQ+bnX1l10Nv0oH\n3oAk43NBNB4RgPdQbIHGn/SZbr/jTDTjQr5+DYWT7HCN1kqk3Xqe4hyIWimF\nNKEPtQuBrGL1SaDjsww0f25ilZ5KPqT1kqHO9IpGHcVhvf3nKjBx5mg4XLzY\nwDjAXHoNPzZzzb6RiCRCA9BhPHwo64ATwDtdO2ITB6HXs9kcjr0p2QbnqNsq\njXfeLtNzwWDNGeuPuXAMF2urJ5IOeUu04jwQR+IfGtOwWUVC5+Gjxm5yydZJ\n+OAXQFFLkWmR6OjajLANJ/r5W2w73PItEmYxVBAzidNi4a0Htyw0+aeN1Zbb\n3m/aSxpqt9AnUe25n2cmb+4GNaCddOpFZjoHf3Sl+BeV+uXZrdYIe9+06WWJ\nAV8VMXph0zaycIEnB6l4NMYXyv1N6VXGK6aKKDO4663PP6SkgeU3jNU/4rZl\nPSuPQTXrCLz2wtiIAzUTtTLQWzkfz9IUgFexuKmCqi60nOgaNFVlPTD1sIYX\npE9s\r\n=oOW7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTw9SbJ/lso0fkUCwgwjrAVsu+BL8BzcL2ou91NRjgbwIgdDBhbeA1ggGsRc6JGEX4vmjJN6uGw47v9neRJQMXPdw="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.7_1601953366771_0.5036708292158698"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.9":{"name":"ipfs-http-client","version":"47.0.2-rc.9","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.43+988fd211","ipfs-utils":"^3.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^26.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.43+988fd211","ipfsd-ctl":"^7.0.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"988fd21191886b9614b97cfec1bce53cc8a83aeb","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.9","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-X17ynFir3sAldpMQw1aFO8sPERllcN7OhCLDXrm9DEmJMWgq7Q+YeqhnVP2jjTvpt9Aq/UbnrFN36nr+t1gn8g==","shasum":"cd36e40309fb4a575e3eec9ab2800a811aa28eb5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.9.tgz","fileCount":141,"unpackedSize":463162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffEtICRA9TVsSAnZWagAAU9QP/2Zd0NHiiDpy3Q+VGjoE\n+5RdDGMRLYIt90hBA8vWLw8y2gAUabBhE3L77hwOw+vXsqy3Ku8N//3YtnN+\nomvB+GNT0wLgIH4btEuI3Yt+n2Vil/9+bhY4ktMsKoYzyMBCEyUwolrOGSCn\nP+t0bJ9p8xRfe75ZyYzk640D3uJ10lkwtBHOuhdtzwXm8f2QZzxdGjbFiDIk\nWIWmT974UXoyWp3YXGsJwI9wuLkrbrSOqjWkJ/FnLekGE3/cY0lw1nN5rVtt\neIQnlXw9+wYjBAxMT+xf3yePZt+NQQMcEWRgxxrU7zPrZEIW+6Q84ByWgqmG\ntEVg0+fp0KVRmvIYpNRt1T4ThPvJbCpJ2ZTRMuo7t+MK+Tx4Xys+pQdHC2vw\nyb2td9GN+tkgG5/YXze/d4qfl6mD+wwXYhp0CFkLYyautmelr6Sdhvvkl3RL\nKXW2Um9WCB5QNVdEOk0NA98kyJhd4JrHPTgDeq4HQ610g8uwfOW0h8S2XvWn\nA66RV8r7ifB/xauT2IA75oWGvc9VJ4Ng2wD0g+TKdZngIulzyBcafHXEbGoO\nSQmasS9xBshBLk8cPTJRkfl3D9Z/xca1l4QqL2anzr/4+GhgRP4Isxv2GIWq\ndZ+AbtzZVJsKjwMbT3IXQ+TNUd0l7cWzbqquU3LJtexFZN30EGdvNawwuzvu\nqQTB\r\n=IdYG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDorBtd6he2yA/9yMG0tVvxp//55Xm0qSOYbo088MVQ3QIgOx+5o4IZ54qYU8lB25snVBkyqTQY3yJVK3Z59mQvULg="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.9_1601981256034_0.9973401706146621"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.10":{"name":"ipfs-http-client","version":"47.0.2-rc.10","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.44+2d17bba7","ipfs-utils":"^3.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^27.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.44+2d17bba7","ipfsd-ctl":"^7.0.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"2d17bba7136c0a517d2de208ca917b9112d70619","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.10","_nodeVersion":"12.18.4","_npmVersion":"lerna/3.22.1/node@v12.18.4+x64 (linux)","dist":{"integrity":"sha512-DO6h364N0BWmALHbyTQdXUY/z0gxoVJRBzsLbFTrDJ8Dmx/1ZKlnCc+JXQA4RMUTU/pQ7aSCfs4mbjcKjVv7dQ==","shasum":"36cd82d35a36fa3877a6a191d8846823b9b6568f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.10.tgz","fileCount":141,"unpackedSize":462662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffGZjCRA9TVsSAnZWagAAOTQP/R8JvVPU/bXCcaeoIM7C\nxRRy3DckI4thPILVfK2yRWxN1gsw6DFAIGkCEtyiEUls1kGskoVnRAUlxZNa\nqZVCmXGC+sJi0cFx5JItdBrzXNDvJekXawx+XhiCV5ErwZbSMNx/QDUm0i2n\nU14IijwgpIjCk359x5cWpThK+3/6m2J0jg1JfxeLhmLDcULpGXjba5pbKey4\nmqtfDUp3X5yq3kk2xawP66qAV96AAuAeVpzlspZEsQWvAOYnEXH1c84P54BN\n2L3FhrEyidtpxJavA9KS1lTG1d2XPtz55zy+hrgSSH+MsDQKLkbUjW+9mRsx\naSHaDlA+JJx5pa/uGrQY2Agks/xMs1C3aFAnMVO6XZi4X9869GiSSVcyszBt\nuODgMYhrVUY8zbQLVqZ5bkvXhFrHwq8IotuIHsZSrEwp6v2QmRthd2NH6ddz\n8UfyVnHb89018g266sQLgluKEDfoVa+6Vc1a8CYgajNjFm3JHS5fvuPutbZO\nVl9G99t9ixIvt7D27JFmgtAX/3Qhu7alr1MAoye6exxyVQ98V8y7Uo46sfsu\n7ltyHTl33zQ+iAUAyFebBH9wTO9v0VBNLg7/LlXPNUiql7VQpxvcKioUtSoC\n9ovvhvoWQtbpc6bnjLhZTJRN/x1PjsjEp8f8oaBvhwPVI3yWchgas/0K4C0r\ntT64\r\n=LhDd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrI/gQyMa9i3OfN0/XFZ7KQjyBoUmi/NSDziqaCd2S7AiAJCX/byK//wOSXAwaWMc4bHb1ZmSr3M36eAseaGQnk/A=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.10_1601988194743_0.8663190203561275"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.11":{"name":"ipfs-http-client","version":"47.0.2-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"abort-controller":"^3.0.0","any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.45+381d54a5","ipfs-utils":"^3.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","node-fetch":"^2.6.0","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^27.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.45+381d54a5","ipfsd-ctl":"^7.0.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"381d54a50a855b3f6c408d3ae8f1e3e5f9546598","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.11","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-y+p4+rJj5t6eRAKKudcI41X8ZwRPU7c8RAiNi3Do00qWSBMGkL12t97xvKwuteqPKsd/KLBf018Kpy4dtL82PA==","shasum":"9c6bb7c2094bb4835409cb7182e7393ca8d167b2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.11.tgz","fileCount":141,"unpackedSize":462832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgW15CRA9TVsSAnZWagAAByYP/2GziSQ16FY61kJYxmFL\ncseH9MpDhWCocBGZ60jSqWligMa8BjoT0tAKxc53rQSbPUFKlwMo2iA/tmLY\nyueZrASk+eX+bfFySClr+kTU7ESaWyKCPLQQ6dPRJBphv4614w+Wo4xvku0r\nd3tbpA7KUwJUMH7SrKylbKqXmCHvYGjBT4A+CdUvOin8zPuTN1Vj0AfKdV2w\nP7daqRFLt2+YZKz/IdM2R0EjE9p/31hcH5vyVI7cK4VMIvNW8Bmgg5AbuL5A\nQ2FuwHgoe/geCbTv54EdzbCf/R9tylY1OuIHIb5xRDaju6C6Ki8a53a3/MDZ\njX6rs1WhswCgEvjUeXzJaUUnxS/7djQTo6HdYzacSJlTtDaPcgcB/S0/jf0Q\nP7wim7U67G/z3T7ficL+SvE/CqoTpCFxM8id5T1wKVC1j7YLkTRfFcTt0bMg\nqhxb/MqS0Enz2NSBbuNjS0bjETElr7w/IeUDZXCEiig5ce99cT6oUAVN05Vt\nCyeEFHZHyKt+vxxFw9C76BtXdWDu7AsxjjH3wlZkwgIUyP5z8Gp5zMl/u0Tn\nCoKezE3vv/0E5aRnwyXf1pGwyx2o3mo9QPUf6qzf6AVFpK7YrCuLbL0XwFug\n/YZdRBoO7nY9QeGhnO5sTdFyDpqwAV3sLItaFdzitOBrORY3mVRLgy5FfOyl\nAHFm\r\n=JMEf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgYMZ1YdzXCRxzVTARlLVHvf+DrCLgM7trE5ulFN88DAiBqPVTEEEfxtnuEi26shnlPRFayEv3RgT2dhvbTm1SAzA=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.11_1602317689506_0.742951661897091"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.12":{"name":"ipfs-http-client","version":"47.0.2-rc.12","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.46+0613d79e","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^27.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.46+0613d79e","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0613d79e3c4dd088d32de823e89099e81eef7333","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.12","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-9q+x3u1Qd0Do6AhucQ6UQ6DvaSlph+5lR/LuKU1I1UspJ7NFLdkS5aJXBcAnyDEfX7S0fFr4CD7B5gFule5+AQ==","shasum":"940006a790100a17c7467471ae6666f1f0126fda","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.12.tgz","fileCount":141,"unpackedSize":462879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgYk3CRA9TVsSAnZWagAApx8P/3gjowHeIHLPxr5Zayoa\n8s02h8p4ziVZ92aRv4t3UL4l7FBjz0gB2z0Vw0GkXlIcsQo+UIfZH3XBk0/N\nyAzlo8HCNDXZILVIRG/b/q+CQi3ESwIlLmxGZ/WrwxNmpfvsFQvHGgBzl59P\naNvQfzpVlQUBfbZpPrVSB9TmhM9Jarzes/yueovNAaE+ktOyEKusbOry8UWH\nH2LjSj66GpMYPOIrvOpdOLqfHY4DuKGtcjnJa6YlA8Xx5GE/2rvFxFXkNZgD\na2zcQ0sPpjyW5CEyXUiYUeHu/G0BVimGxv67g77ObQg9PjcjdC8ZhhIHM+7Y\nXpPdsjLRbGHBlj0AUFktWlI/toWGrlGP+IBoYl+r6nRhHOIk5w8dvDGV4BkT\nTV3ZUA/8mnb+lZSct68mFfLuHS80XOYOY/F5sLULoG/vB5CmaoXr7dHK2t3q\nfQu42U9bDjvH+RHLKFVZW8/3jwRk8LakYm5dZdoA9yamlo9mkb8QMoWUz3J9\n93oPUtR8V2lJgVDcrkkFBC/oV66Rnk7v25xiIsjcAsiy5Z6ygduKL03kg/gv\ntJhVtebAt0/c7CJrSKNgWb9k0+6GnFTGM047w2kVuukh8az42llCCAJ8Xkir\n91i6cie/egSFE4FXlVfKtsXbggovUXXFCaoUQGKo3mK4T61yXI1pfYF5Y+f6\no8tk\r\n=hWmg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkWlF8uTJnLmGurTCYiAXonI+VJlyh5+5/4/v5tbrZRAIgPobij989tyWrCGp7+iQ7tIhbijcirCtFl/H4zf7F2hM="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.12_1602324791026_0.5273797556275639"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.14":{"name":"ipfs-http-client","version":"47.0.2-rc.14","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.48+8afb88e5","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^27.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.48+8afb88e5","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"8afb88e5ea3b0678af1aaa633f0eca6156b2130d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.14","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-/KawRcyJLrSijGzWsyajHyqceMw/RsQHNYmxe4/VuMG3L6jzkSRIbUDg6zwGHx4AL72br/NPyXBLGJOAhvjX0w==","shasum":"511994af48f96d34830284ea6894e9054989d75d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.14.tgz","fileCount":141,"unpackedSize":462879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiG6gCRA9TVsSAnZWagAA/nYQAKHCRJrktS0AEq/9Edg9\nDfWIbNqbO6kWY8Tlv9wcPB+MbnVQyH1un1RPvrrBz75C97Hf6S5/A0WaqtXJ\nyyng/0oXgeYt9dzp421xr2VHmEs7R46aT8eqRMfG7A9GbW55uZ+I83YXyVUf\nROlHjd4E3thJP53XnCYtQcXnMY4I+WnRv2LdLRmhlxHbisr5fRdI+bPZVky3\nFryEuWfsRK6kRe1cUFuDMZ8h8TfIu4EJ9VrUzpd+3GFNk6hcqzgWeYBtgzTl\nvihR2VG3h57540XN5fwSP77+O1uPlnnO8fSjtR4VruOFjiy0frvse1LOtb9z\nm72RzCdFKUoSq/PaiErPuD3fSwG3uqfaSwhdMP1XOgfHRid3Ti468EUvL/ta\nlFQZ/Ha+AFZ8f7eS3SAukRYoohm39/2hDR03Uy0/swJiCWxXtF+Rtu4eE4WJ\nBd2xX7/SVmzhWrMEv9jHdGe3XJwEzIjpotnOkNvCS1EAsrxedtneNhRW8w/N\nEK6ik3idMAj6xsPdrDn5bt3exTfgbHySHDVBoFyqL0oCosW0UBSHdH0QiK7p\nOP4tcRZFXXk3MeHB6i4yjsg5Eb694Ln4brEdyNS5Al0KeH/OcB/1PVD4SUXa\npTa6CQsFqKjrCUgECCWUS9qIobkqBpJ5RZP9tMG/tdvbHXlM7mhua7AOHYA0\noiE2\r\n=JaaL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4Fn4b3s9rALuS4OKhrjmWw2UPDJW+LD1TnmUVPVgPDAiEAgwtLypJHE2KF3kdk1uxnHtQF8BbP3fZtDGut3cKYDXA="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.14_1602776736098_0.7080642990872275"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.15":{"name":"ipfs-http-client","version":"47.0.2-rc.15","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.49+b579b3f7","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^27.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.49+b579b3f7","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b579b3f742cd07f8461a74e1f8a08eedf1ee6503","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.15","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-HV8LA47rgyOK2zjWOpryRmZSJdtf3W/5b3yqKMt4TGOo0FPdbfyrs5V5jinhvleg+L27wMOn3FBTqm+wSikQtA==","shasum":"e8accc971dd64bc2b5571fcea75cf2f9d11acb27","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.15.tgz","fileCount":141,"unpackedSize":462879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiHLpCRA9TVsSAnZWagAAfjsP/1m8Ygwkt/IqKB5OdA3h\nKgAqda+uoy9PQKpdtAaucjh267YTEVy7GNDPl+Qi+LCRjrGyZglvaqbCFGyd\nKFq2aFyLVVw6MRoPk8a0kPuBfowG+OvW+INK0BqiaU49iGCZWCIPfLCeP/DA\nVd7iIxLf3yy/yb8FxN/Y5OwIbt9+MIQUgNn4P6UwI2F6bHL+A7Htoi69BXRe\nKqIXY282pNRCJopz6WFAqO/loLvQEW+9LAFzum5bhb/hUlZbhVa2BbX6BDea\nAQAfFJP+C7AhMF5HUQQDi4XbQZgifdpPa/SeCOmVW8mBAEjDgQvd9yH0lw2U\nFFPJb43vKrNYG8z/ZMubNkq/YfYgz4SyERCBqgz3xURz1S/kVJo6zz9Bag3p\n5eoojdNibrIW/PeJbn97anPZUynBKvSr5ERXDPwC8GptDux+JCYxmmPeGhQA\n8JfGv/beVWPzJl8+twTinOWH10L75rQk3Gqi6tU2UX6xudy92F/LiGahoUXe\nGevw2izbsuMn4zIq9nUKulvPFx+8o7S2bQoCeLr6xXDzSkksGFvzjlLnjnNz\nSDxxNhBp8cN4eQ9oJ7aa/5ExRYWOtAfzEr1jf1Wd0BGqqifwEEDrqgiY/YyL\njUdpXQVoMub5T7J+Cv0+wQN/Rw2un+ajK9h/BdDKxtOhYIDe2EGmVBhHjvTc\nRH8q\r\n=RI8l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmYypyJnADaMbwMuNJP+pL3NciNIpFKSkQjjJPQ4ij3AiEAyAoiVQ7KMyry1/YTevWzBAKjwFeqqLBUPyhtU4XnTbo="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.15_1602777832822_0.62089485895981"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.16":{"name":"ipfs-http-client","version":"47.0.2-rc.16","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.50+c53491cd","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^27.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.50+c53491cd","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c53491cd5fb075025f2bb995a8298b56e0ad0865","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `ipld.formats` - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support\n* `ipld.loadFormat` an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.16","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-1D5hvZxkafzgDlb71i+DpfPpgRnQhCsMwejbVu5+Kju2DRv3JFY6mcRhZTBPLCG2PyVSXRmNy9NUShHK88M1nA==","shasum":"34ea89e97251b07d272f646e139e3c5b093e0909","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.16.tgz","fileCount":141,"unpackedSize":462879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkGXkCRA9TVsSAnZWagAA3u4P+QGC2ssQJ4Fn7p79aGG6\nmtw5ihBJN7OZkbm7Q+1osKXdYBa/dUpq6oxWC06X2fx5M6szLoZV8isx2UHO\nFEpcozIuGR4kJ9LcexOIZwmafLMwycmIqCsPE8NnI4fVRGYg8u0qY6E2rPNM\n0RRArGHpDmRQDGWj+XcIwradj9lEMi4chYv/u6JRE+GD83gVdjHTZCPwkVdy\nbsbhBVCzYgFpP0lLNjfTBcmRjL1rhxtrqVjobL9b6QK4eVJes/XSQq41XEvT\nZMgp8RD9RxGgMWQ7FlG3vGBjDTmkHNI2NDAYWFzc8a1mpJtbPwhcTovVj6iW\nnTAu6jfaoGSCjkq5y6xbj6fQhmfsFLccaLLCl21owJiVLHKEPL0x3cFVps9d\nHjrJAlJOdQr10RZT/V4aSz9ITkttQTTE0tZXv+stxjR+RIo3kJLJ2Rle7/qB\n4Slr0vB/IpqKI1bXY4ysRHDNClKaKkdbZDjnCGkfp9iaoU+I5Hiit6O8ectE\nrQrdYWDHlKLWq6abFfBF13XkonzgJ0+iOmBhNRhFcPMgT8zFK9Uq440J0E95\naMFqPcCp7n15t8TmtIfXHIfum4e5nwUnY/tQZqGFamussjwOMpvjN6fUbwJ+\nGpSTCDoEZjlBZRg3udVivnfVVJkDCw+4UYRq6cGwDIf2qPq6EucfXX6l7VGr\n6uuA\r\n=ZtR0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICj6htSr3XhUP/Hq4j+k3ClLGDK627PyZP3kAolNaJmEAiByhzyCQb9G0V3jszw8dURJvVNEqq1l1y63V201rlDlPg=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.16_1603298787703_0.42145052528707816"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.22":{"name":"ipfs-http-client","version":"47.0.2-rc.22","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.56+a00bb678","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.56+a00bb678","ipfs-core":"^0.0.2-rc.5887+a00bb678","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"a00bb678f58a07194ecd130edcc8c1c7148e60b2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.22","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-vcbKZIBSmJFRTkhoK785/Cc49TIMpsb5dhEDLC29LnxayFoyQ4JrYL8CN+hqUrFCcxJgnwrLghQQzqTiKjLuwQ==","shasum":"7db9592a87aea88d18e1b32498f3d797a789aa92","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.22.tgz","fileCount":417,"unpackedSize":791552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkZGVCRA9TVsSAnZWagAApuoP/34nskQEO6LUkU2klmLU\nB+MvXMg/lhd1TUxv4g1BUyhbl8a2hjz2sCLXoKrjhq/qyRK519Yquf6yTDhc\no+72ejF6HytLOwCVEhfvdzyTRjyI2ewo5w9Z+jYiOrtCozx0hc2yKYZNc6zw\nndFPlnBsm1WnYk9cFwVdpJAkhO8Hw82Jv8Fk1shqLF3IxTOLNhv0fJKHxnq5\nmvYcXHg1KGc1hpXaikF1XY/h15UV1Nfhjj4pyI7MdFMeGq8UhWhQ0ndWtowg\nzvT05m3MogHeaNda+74CMjQn5nXCYjetDF8IdDpzxfXVgsU8CenspOtotvfn\njw4qK9BJyMltvBzs1Q9Km1a6npyQ7PmBMj5kqQbwdaATjjH1HboYyCtUuLpk\nKQVZAEXTBy05rSBYn+QhxKEnQIrzNiNiRZWizdD+Km1XH/2SAaY2VfD+0hDi\n0tApOoW4paMqKsqnGVjMuYG4JFg8mzNrmQNqmjNRhSl2sToB2Wh8E6pUVoZr\njhwZS1fxQ+1WUIY0Vku9WVGDeucFDHdu7Enz1i0LXQlrDMmCLeXZv3T0Gdm9\noGkQQjahgqIVHoE4WcDkeIJd0XxxXJOYMxzP3ZWdm+JeFMbSpAr5aFISloLN\nm1aJBcnG27AVWmuc0Rzorm8KD3k7StC+cWm+wTEFNb8m8rWRpgc4SETfjGVN\nGSZX\r\n=al4d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHHj7jxovwjseQV0l/EgkWWaGjMWE5OLAv/fBZKEkSviAiBMwF3KtpWP0UVXAwK4T42Hw/Nmg0r9vq1Sks2IzWHYrg=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.22_1603375508600_0.9226961483260858"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.24":{"name":"ipfs-http-client","version":"47.0.2-rc.24","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.58+13eda29e","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.58+13eda29e","ipfs-core":"^0.0.2-rc.5889+13eda29e","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"13eda29e37af836f49727d05c1a95fd072d940a8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.24","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-PozJM9VxVKAd92AFxazK5INSDS6JjrxMZm/6j6hPKlFpTCxFBW8hMeg/8CvI5uw4OQiBaofZMvIWCjTgjivtTA==","shasum":"ebe0bb16c45d434c5effd1adf007a8f38c43f037","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.24.tgz","fileCount":417,"unpackedSize":791552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkr9rCRA9TVsSAnZWagAAUmEP/3g6biJe763qj5QSrbEX\nPEo/lT13kn79SA2o/WXfVdejivPq8cZBEyEqHxxL8zeKX49sgbgBBrQjODnf\nrD95+ARoy5iSZ5ztrusKfG3JKkm6uAoUzm/vXVWk4VN9fnzBtPEL2U73ONLD\nwXtd/u7rELyzWvrZJV2YpGTp+GdwB/bW3igDIricIv4cGhsc0R2r4S51i8u7\nKkoEhkmkaIp8rIs+ri0Ltq+mnp31C39atuySPvtj2gDE2Asst6/LIrmzbfEh\n8vk5GT2AIWoKapwCmgFYs9Ci93fKvjgfBEuRduEjQzhMiczaaXi2MTunDlx4\nXsrigJbzF2jB2THhdyrGu6i4PCwYQX5UMEqAIHNNyXA94C1yppu39SLlm7ne\nhCZAI6Od2JakLZJ4D4w1DzF/JjOqNsAjH1ckh+JseBDBLqqci12qmooH3rXv\nr2k0PUGAdlVHy5xHa6fDNUDc1Q9ctTtrW/XE2fhKQBaV9gb3HeDa8Ju/aUlY\nATra969OSz0/QrK0vG4dndaCUxaUCBi4RYHXcEIVOW2ScdcXo1c9/TpvJ7eV\n040kP1ICItln0aJRmDNe9B4xCJYPjI7y8HaxjW65Pd7puFFxmZ16AhY3s8Kc\nywuXqcrlIjU3cAaVfZcWwRvE7mwJbOFxMphD9OLgr4PhCsDRD42vj90LKCfj\ngqpC\r\n=OmxY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGT5lvr8n4jV1xB4wBEPlhQ+SFbFBVitqD+efz5xvOJgAiARkvx7lx61lM5dd1Rvzoi7OSeueibwC+1aqLN5a8X6aA=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.24_1603452779117_0.23440255594006287"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.25":{"name":"ipfs-http-client","version":"47.0.2-rc.25","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.59+94df21ea","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.59+94df21ea","ipfs-core":"^0.0.2-rc.5890+94df21ea","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"94df21eae28c3a87bcf57e168b1379edd4674cc9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.25","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-eBqJHl81lpT3DZ6aUlUyxR2bzDkFx/OjDHaobrfiwCHi1MRu54za1YbvsCp/XLzGiiImNCneyxwdRq5MM4EsbQ==","shasum":"40c8d1dce1c74aec3ab35196c24e16035824bb1e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.25.tgz","fileCount":417,"unpackedSize":791550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl9ILCRA9TVsSAnZWagAAU+EP/0yh7dGXP3fDfhKmrAqK\nFUPTgA+ugl1mImGrDMc5s+L/EAwZitkyjE2jci7OfoRe224UeAHtTJKWBGNv\nVKER9ifKZAt0No1QBRpQG+Upuca6ORaZHYq4amCgCPZSw920R6GSu1lvtqJo\nWijFFWi2FotUTsPNZqwGWiI/xE8KZOkqjQMs4K6n8gL0BuNDlOakJhhgkrJm\nOpbQZFDByH9iJfdyv3dRO0ukhne2V9cd/BeCq/FYs1t/Hhm+4LDlTs6K4Kj0\nO5sNKvX5RPcItOWlIDqG/hAhgsgWWsI9HSr2QeE3t7pLeXJioHqaf4jZSZ1N\nfc8yWN70uEnIikJPhHGXWGj5k/OqdzmZ1Ac160pcHmAhLNkObvbf+0EkQt8u\nu3PZVe0R7av3Ehac8NHuIGCOWqAoXA3xZ4bdklBrfU1DdOHXNLjJ6CFlPIqG\nEguzr5niPg3AXomv68Tw3BgrdkWHCAx6eUuh78X+zp+haPCfFUg1Wdl/MD6v\np0u4+YYUQqmA4MDVqzpdohjYOruNNMt4MFpR56bY6MMQbuLJpQFmDZVV5+dv\ndDgv2kknU+JFPI0gZJ+nlodIj5aWXWukYDuXiTElP0mB6MIcRDkKC11ZLps3\nQy2RxWqyUOQvijPs5hkSI/ItjWyYVeJG2EXN0gnN7qPP9jEr2FJzlig8Kqtz\nmvgT\r\n=0VCr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCfagRwaJlg9n9MkrePaxQT/QR0VsEB3j5GBG3WDRRPAIhAPfwqS6sL3tgty20FxTsyH9cAQZQVWPkqn9y0jQZ45rG"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.25_1603785227329_0.3625487932493554"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.26":{"name":"ipfs-http-client","version":"47.0.2-rc.26","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.60+467adc3a","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.60+467adc3a","ipfs-core":"^0.0.2-rc.5891+467adc3a","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"467adc3a3746f1c554616fbb4b79b1d62ddfcd35","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.26","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-6LzVvDnSa7vXtnbLjEdLDWE/KX20lXa0zWkxuD6+7GqSyi3SrlDzVDFbqCLEmiYJ4RF6/d9hEo4H1r8eZhvXOQ==","shasum":"cfce305cc7b9f61f842da975830822b5653b8ea6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.26.tgz","fileCount":417,"unpackedSize":791550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl+c2CRA9TVsSAnZWagAADPwQAI6CVurUaqt4nb4h4a4A\nGqTIlrTkQ90RKdTzVi3qrXTzVj/9CG33jkMuKaV2FgH8qvfBeVCKeDQx/D2H\nKCZWghd9YmGhm2FaPj04hAeml3wY7AzU2ovDqsAQBqlNWnVUpeICsssQKCV6\nYoswFPOA3DKVoePt8sqx45mk4lHhY//ZweZDHsvuTwHdk0ZYi5+eHzydGFIM\nratkUNhpn5tCOg3AK5yRYIOkhgRX3dJun1oRHJLdkaQ3gYFuJZiqTJlpxfV6\nGgD69qs6CR/rE5Wlw9Dpw0Aw8zfXrIh/q41DzpzHgxcaAAGhUPmuLiPXlHn/\nRWsmlFmTKJH/9vQxoIPk53+/0X9vxT7zo7SdirTdjGAumJtmOPdPk83rcWwl\nVUf2XkLZe9cPH3zka7+F5qriDDtAn2U9kzeqXsfJP9QlLlFJNP53CCwV8QR3\nYzipiyrDl3R89YGwNP5eiwQxeJQmVuq5f5fgkZ3BQMotvm6i+dz1mK/92hQ2\nd4GCRW9ZuMHCgzgfUOlIcMJ3gm0/Ym5F7uP9PG0x0sWuAIxEnH9uBDS1+ory\nbp4Bn/s+3WEySFfbhjpB13oC7vRM04hm7lVSqNJMumlFoyjakhFhFr6Jlc65\n6Dm8JLrfqGHY/fLTF1bFPY2nYQz1rHpbGMce+Y68CYXULG13xVeKU0+bgaR4\nK3df\r\n=nabj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGIk6S5slsKnyg1hLEb3W2o30BzaoYIrb95Ga47HMlYcAiBm2wqTsB5KcNYN+yi8kB3lF4tftgUfOtoQ54/ychMwJA=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.26_1603790645466_0.7794358111380135"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.28":{"name":"ipfs-http-client","version":"47.0.2-rc.28","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.62+345765c9","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.62+345765c9","ipfs-core":"^0.0.2-rc.5893+345765c9","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"345765c9287df55deb215c772bf0d863a205b116","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.28","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-3VgekbbLUfStAjXjBgRiX5D/Se5P1zSCm+gQYphHJjnX5VVI8hJEvtLGy8LKPAz2Yl3IC1b+G5+oZnJ3d7BJRg==","shasum":"ed54be73a406291dbed0e06b7b1124c82545c205","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.28.tgz","fileCount":420,"unpackedSize":792644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmB22CRA9TVsSAnZWagAAXUEP/2VUBnCOvtfnTp/fpjvU\nS/NOmLsI4qW1BGSmMOal/MF/unc5S4vbQdtmVYHjhZPJivhw097KDjX0Gam8\nbQONIDcCAwjdqbhjOqwrY83/wmz2KWm1VFlPJ4K08xNDT+OCrAwdKa6qk4an\noKesuFd9oO8aSLewd3ScVav+w4lijq3hOA2BrXNzJl0wxQSQl/13P/k+t+gP\nzBKuHtvPB10dknxV41022s6NM7Xe8ntU/vIValbTEsVz4JVWyBge/p25uyCO\nFdQUnGjea6YuMbNzsMKblD6wCFR+VZSFN4MTblB/X/hajQdbZpPIMU+QJ1Mj\nDq/prIKgFH9OVie88uuUbmRORMamGGUEaQeGarLAKK5HW5b7zVJ4vSOKEESb\nPg3v6eRBrdHUZJzTYTbPF8r6+RFL7D+O9klYvGchWbwP57mYOrxNb4pYVr6a\nZespAfUQeUrSHH2/M8Z2UoqhW0t+t4eDlH1MWBNF9/rH6lp4rNdL1f1Y/cqN\nFUipdX1thDwlMJS/pnIsXf4zXyJ2x/RHyuPzek08s4JmALXdo0F1SpDH4MCs\nozBTIhHoc89WCM8kqCRkwRdPiL7IFT7wDz/xdtIl18XjgpX7SpOwGdDf7IMH\nvfzVp893AGhcv2LUJ3srfAEuFSrbMO1cAcfltbKgPOrMN9fi7Zy/2JetCf5g\nrP2K\r\n=khFf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiGLfP+/GB0oANtBjVMELZD+2rZNQPtp1irNuVtB5ORAiEAvY5QBXkdx0y01tjf/8LaxAvRfttuhiTZY1lMD2FOgXI="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.28_1603804598325_0.7683019212215969"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.29":{"name":"ipfs-http-client","version":"47.0.2-rc.29","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.63+c3772b4c","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.63+c3772b4c","ipfs-core":"^0.0.2-rc.5894+c3772b4c","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c3772b4c91855da1347eb954a5cee186fc46a562","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.29","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-KsCdT5BJ/uc13/6vdUth1LQBjmfcFQcT9f3+kryswppMPvjFjfNGsRl6ZnMcUseHGaRNSnN6v4HiO8ftHZGF5g==","shasum":"ec50013ced9aa7e3d6315a98b3f1d8a06fbbe0f9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.29.tgz","fileCount":420,"unpackedSize":792749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmDiHCRA9TVsSAnZWagAA9L4P/344HG459r5okYhjArl/\nXC5WoySIOr9EjIgk3oo/P505Vz2Tpi78k3UH0eH1Im+9LsZaYYGBn3bQm3w/\nNnB2Jw92BsZ1Yr6zIoqoRbBrFVKvONPQI/K9Bsj2ze8XrUArG3RV+kBGkHtv\nasR7kdUBQBaj/jbX+i4J/kxY7UNM1p1T8sxehA6CYjADj62aXMw+FwNW61UO\nNhjfobJ9DnrM2O6FzXuDtg4FHXNco4CYFjUaqmO0rDAYfm9/p77OjYCxTvGF\n2hJzjalvdIfTLDZB7BN8+ARzn9Jlv9DTLP7DVWX04OMIzaCM0P3oOxCYMHy2\nw49/KZBYjTNtoMwhmuCjWqK3Nw+/vkVYyFLohWkzBKD7QPAKjTHQbWZiuzKW\niZqGLTfnIySxJzO1p64YZRxi5xI0bmpvYcRL909oo/esJ5cvIudWojHv4pGY\nsEyPDcZJnC/Cy5PMKM+8FVGVgTVL/N/maLxfDf8gdGM3ZYnKAyz18G8cpCoc\nZfX77GH7KC4V5p88WFfm+A79n1Cr8pbSPBOWldiIxSFjLnbxY4zJn1wBfz6r\nlaRadopymSO/Jx3JfMTaVD3OFc+WnM4wjXJs2RULW78rXSbfYcJfKKMu12OV\nv5LH+hz7qvNUhOWSL8FbxkyI7e3iRfdo3EqeGtP6iTCk+zFeOrx+SiBZUQTd\nfdIJ\r\n=GgaW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHWtYNwnwYemrrYK/5dU2GkMvDRwWE+ay+J6liAVxzA3AiEA8DuZ5wQIDN+gPESp68PSO4q6pZBw1liSuU2J9raxTXw="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.29_1603811462520_0.020001038998610943"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"47.0.2-rc.31":{"name":"ipfs-http-client","version":"47.0.2-rc.31","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.4.1-rc.65+70196444","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.140.1-rc.65+70196444","ipfs-core":"^0.0.2-rc.5896+70196444","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"70196444f942cec93d00e8feb637dbc79d5fe37a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@47.0.2-rc.31","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-zwXr/aL9bSJm0Yaj24jcDdCb6KzkbdiC9z/eYphIpYYHKn5g2BnZA+Jl7aGNxPu/LPnF8LzYZqblBRoIjwA/mw==","shasum":"ae10e2d66f4a2989d9415c3339055e183efbd248","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-47.0.2-rc.31.tgz","fileCount":420,"unpackedSize":793778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmYGkCRA9TVsSAnZWagAAJzMP/3lKrgTffK7pK+YdfyTR\ndhSA0Sfgc2HowGTLlkvFZm5eoknqrkkwRQCxzcYPcZtcpz+SAHICl60uL1na\nfdIQPy/bIkv/0gXEtkctQ/7koUMrsNXGM8C5LfCcCxSQfokUCVZL0k5VaydG\nmd/J6juMfXhuUIXS3uZIkVttBSdzorpnKgVtZADXq3SG6yV4SJGrtu/B45ad\nMNuz/6bB65LMFFn5jkDuueimodrk8bj3hy0ptsonWn+auURZjGSzQzHidbd+\nVxmiyFOviI04xHZfuk/0JEkea7LsygAatqousMW6tMqy0fLAT4tWnx0tXzHH\nESDF8GGpGNmW4rSQLdrSTYxbcI+tIp/p1knT2pGrk+f9+4ihberzfB4FZP9W\n1U5jMro+YZ642tzRZC1tyRbJHPgh4O1lF/JgENAIxubfifJhh6ZmuwoL1AWl\nWnwSjjGG4/7HeCif1M8R9DLx+0Vt0/I4nL4hDaTANQTs3eTz28A3Brz+Qr8P\nHr6br04XL0TCJw7TIXdZyztBL1yVShMyJOR/PfPgZyW25/Tzq9TUXudQSieO\nlrQNiFm6APM15zjHHY56FStCCbUKL8xAdVIbCpf5v6x7qT1ovXN3v6jFVqoQ\ntv0Vim2Xa2ZHTEKJg/Y1g/mg0SMZRfuqvVJw/O8tfkRgx9Meb0ghCbsbcB6H\nmVQQ\r\n=tnT1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJH9qcyWXr0jiUP7GWSbY1Jaoi9jyFwRyTA94sr7jl4AiBA1ci83SOXEmI0Gv5+1j46Hhw4hFFITgK272mPf+K8yA=="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_47.0.2-rc.31_1603895716146_0.2568549660581785"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.0":{"name":"ipfs-http-client","version":"48.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.0","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.0","ipfs-core":"^0.1.0","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3f407ae0b36d6f7d2804abef956c9f035f3d298e","_id":"ipfs-http-client@48.0.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Nz26Aeytc5QvikiDVOwmrE3vkLRsdGrcCTeIdN/1dxFI6n0K+jFUL/2c3H3rJWRgEcD7yMPxNU9KtLF0x0okXA==","shasum":"1eb8f2b72710f66862a8a2464c0604c4909e795d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.0.tgz","fileCount":420,"unpackedSize":795838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmZO5CRA9TVsSAnZWagAA8wgP/2NZQFcbNe7HaBj4FRA4\n6O9U9dpQOXE5ZR8k3RqCxkKeQH4cDzZMU7fu6M8Sgy5UwqVmrbIOfbC+cmHi\nirxVJccmGmEO6HXWXm9HhgXSN5FSxDlE4tkw2vDALIRHnOYDDp2iXIMzFM6d\n18HqBDEJhfkMvevJwFldjXHHS844NXxIS7bk67zS03m/C8r/jpiXebGKfy6o\nalhv0g/lwbGNgp7Lpmp+e8KPFuDJtK/EOqVv6SaUvWNVOL3GYNKYJtRC4poJ\n0QB+6gJMC70EcCrts1S9iOfUvXR2ugIGbVWn22Rp8UEP9QSWL7tnzDRV2QBk\niuVg/OmxCgoJpVEvep/bmhvzWOpmC+GdcYwIujLv6UYkqyxNQPQn7pjpvBsG\nzBeDDRWFrtQsoCZNF00UFrJZ0zcRSBNzv26+d/JjTpx286zSjH1uTIXF/arR\n850WoNIa3I0P7L1AAnKLnfZs2DGY3Q2TZC9KX2CiFDtaZhGeoLCrqUEgFlTJ\nnf6DUcuqtDMQPEDXNBR8is8dmsoDbgoIPFAD04AbTLl0x2O+Moh4JcsQ1U4y\nGAzDcfR3n9UrIGkIlxOhxw5V/lkK2nj8WnQExif/Qyaf6WsJuIxqUxAFK4GT\nb66crY6q9oqpvdDbbWnZTRvTqcVnBuO0L5ibc5KWu6cYvVN5Wsw8miAyORQD\nb905\r\n=h1y1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG/2fnf3BP14htqVcKhZleXBBSXV8slUNF0sUc338aomAiEAqH5V3rZXQI+e2t2kdxmBvbbCyFOxudy/xOQplqJlfYE="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_48.0.0_1603900344631_0.9211482118738261"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.2":{"name":"ipfs-http-client","version":"48.0.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.2+097d7cec","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.2+097d7cec","ipfs-core":"^0.1.1-rc.2+097d7cec","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"097d7ceceaed9fa7983bde829f90066676b664b4","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.2","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-ZG3/m3Yc7+vggn+Ma8qWA1VZmfLeaPcQLuRmU7It6kXRQIIzBHP50EuRt/iBdpqc5IKRQmAGZv0q20UrnOTb9g==","shasum":"8a81632133bf57f113e0330fe34bc90357232b56","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.2.tgz","fileCount":420,"unpackedSize":795699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmaVgCRA9TVsSAnZWagAAPwwQAIe+W7pfe9d+Unn/x/lo\n+Hu6jPGdHVIkx6kiA2wggxc42ebX/g3N1mJSggTjeywlFuSgQVQItdvamEtI\nviGX+8tOgi2I58QYH9wf47swx4h9p3LytSEOA2FOH5MD+5zbhtfc5Fnfz2jC\n+EoWJcZ6fXz37lm3PQ6ayqVmR1s/HBKzFIAmBk0F2MtGguZCuxqD98SJbm47\nNoNy26B/hcafrxEAPjKZy6e9pGRi3QQy62MSCsNcjBjCe6JQ0J0roMKVY/sX\n5te8s5qAk7HPPeBL9VAMGe+clNsFJt9YxNsCQI3j51/D5a4h2gEJ+T+ri1rh\naA3kC6HAuJMLa8Mdn7k8vyusHfOFb9iVqpntBA7sfPvAeMNftjMHgZGKg/5N\neiMddkePAuUeM36RCG/bnpkKRKu9/GqTZMawZ+gUW8ohKlK4P34glHUP4MTX\nk7UUXFAgyft37vQXHB9+Qpl4RgBAvf5ifNPhHZY5pR5rbXBeyT8ALj8WhpJa\nWDFZjSld7x4hXUgZf5reEkwzgxkstOOWaXO3MJVwEIaWad76dqt+JeSoz1wM\nz/CUFQiZH06mA1FbS2Z4JMRCSacps1JN82WLLjfCJZvFzDD8izR/lvzcue9b\nwdD6rwuqQSySrZMxClLLBCgfrm1X8ystCKwklrZcwQ/Jxr42UhBOz7FdPL6F\nHmDF\r\n=FSNZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDncEmDt6fWIpn9huodM3+VRJvkMotjHauIV24zCF+b4gIgSCP8U6M4grahsovyNqw0nQqdYo/q0mZEhvmLbImr/HA="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_48.0.1-rc.2_1603904864003_0.7852860341025565"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.4":{"name":"ipfs-http-client","version":"48.0.1-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.4+c4d7505c","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.4+c4d7505c","ipfs-core":"^0.1.1-rc.4+c4d7505c","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c4d7505c6c5a2fbedae72d9047f1363747b4c2b0","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.4","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-xhHPK4POlvYI1wn6zWiHQpnvkaVORFF3yZBlUmKb/0vBCVaHBDM5p6du+Vk+QQWkKqHWUVbf9+ZX6gdetNszxA==","shasum":"773ecb7b621b3c3087ff4e4b6a834185f233dbc4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.4.tgz","fileCount":420,"unpackedSize":795979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm/mKCRA9TVsSAnZWagAAQlMP/joPi3Bgsr/dHg0Czb0j\nvvlvGSKqTRpB4fB5diDDTeBFrd0beWPOAgUvITSdGaG5VMTxH/2cdCtq2St+\ndw5/xD2JB2vnGNd5aZlK4JyWr+Z/k0ooyvKWHA90Q9Jmyzki3jqZR0qTmvwd\n1JHeqdkUfGJvmSRFWQ/DkJwThlxurAo1TEYxutM7u5hpECxqwTaTccneqcLE\nfLgjm6fyDNL6WN95hKgOBm3UqTh6PRlwBI0Dw8PVFtCzhvLauUEP3vkWL6CR\nnmt33ZUyfmyOdlOJmTaPZIeqCQBijYuYmo8ybQSrFHXHjLjqPPwiO+RXXwrV\n4+roFH237Q2wID8kBRNyXh2ICUblmcroHf2giwzWPARF/s+i4UoyRSQoiUhy\n5R7alU0ilEcVXHHGZKKKIx+Iq1nijTT5cl04/NGlIiYCaXnY/a9AYvLGHBH4\ngpOglB7l4fjerRAQriZEaSu9Vp8ofpMx8+537YuqeYs7BjJ0QoM3BZl9rudk\nxQw8Th1owyEoR/aT/UxedRujTRM+dNQvDeDgMLpdeetSwp6RABk6dPzVvYpB\noHyhnVppy33Cwdsuim47UhnC3eEN95hL6NBWHV12cRi0O8uKBD4/wG7kRDBC\nn1uoECfLPxmm34pdviq39Mv76abe1QGlbo2fydvijcPnNWgl+di5pLP6sY9r\n0osD\r\n=u9xs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQVqfxCr560F1e9je+lLX/HJmafaNpaKkgS4o09pRqLQIgXEVgYDSIwuLHIRE22X7Lay3rEjwaArMnPhq5Qlh1tXk="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_48.0.1-rc.4_1604057482323_0.17970283091093542"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.5":{"name":"ipfs-http-client","version":"48.0.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.5+bd8708ca","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.5+bd8708ca","ipfs-core":"^0.1.1-rc.5+bd8708ca","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"bd8708cad08c9723c3c86457ddc14cec84d1793e","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.5","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-+DTPlJdjst8A4mbyK/q1f3fy9JS6fNHSv4Ym/ZrFSxmcL1q+MM2VDVur/qhRW2GNen+Vx1p4NDvPJPpYsY4j9A==","shasum":"77cc8e4811cf09fae39ae25ea1fadd3aeb776632","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.5.tgz","fileCount":420,"unpackedSize":794234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnDLhCRA9TVsSAnZWagAAjgMP/R9IGzeYdYbekJaTqptO\nn8i4mI6fq+AeHdYJJlumWkHLSdk9CTjMTWerp8Zc0CsrsRRfPvrqR1amKTc+\nLZTj5E0x9OagcQGt7Ls9bLAgwc3nzlw9I5L63dMjoPqmZpMXdogs0W7/GEgG\naxnxf5tROC4dxtBtJ5s0vJM3uIr8cp5ajdayGc8+OHocHUz1UctKTFwfBi1T\nP/fT8LLEAlRSVfw3XFxP/hD9fD+SHVfioSXPoAIAXgBujeNzhTHwytNdZoHz\na+ZW5haecc0IzE4v1A/rHU/tDDXicd3fP86qWvzKSqik78skOCdO8VwpEYh3\noNlls7hkaeB2ETFunPH2rSmkybM+lI+4tAflRDr3NqBNeJilIxnZ4tDJ5MWZ\nKnhmzuwovkeTHaG8zJbzqmKK2rmLr+3WgnPJfWWNcJ4rM0cpJB7UzOQsc6Wu\n2dHMOxGkWmU+Ry+/Ll+Ej7ZktKOQ09U+co6OYV81cyUG/mI505kUxWhI1LvD\nJEV/WgscHgiKwaXu6SLQHRD/UIr2MXjCLEyp93k7UHD/tKPZstrx4WwV6rqo\nM1MKd7kl/a1i8sLF1Dr7TQehATnvdXfjKbTy0N12yj3QPuRLskws8FbEIUhu\n082bq0cIYJ9AfPbFXeL4xssBNbc7jGxntTsDKG5a3wmWF3a0b5TsTtIAPqMN\nvdZ0\r\n=MLCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBlv5W4Scx4qtqBkz4LogSAuWzXtIu/PvQli3V89nhlQIhAMKoEUNsA1VJVn/I3BuZDRrRw+Aeo279kcQU7v6oEPL0"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_48.0.1-rc.5_1604072160485_0.10384945126659617"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.6":{"name":"ipfs-http-client","version":"48.0.1-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.6+059520a2","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.6+059520a2","ipfs-core":"^0.1.1-rc.6+059520a2","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"059520a2a3467952650dc9f45d8df790251f932a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Getting started\n\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Read the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n\n## Lead Maintainer\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents\n\n- [Getting started](#getting-started)\n- [Lead Maintainer](#lead-maintainer)\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [IPLD Formats](#ipld-formats)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [Importing a sub-module and usage](#importing-a-sub-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [CORS](#cors)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`Buffer`](https://www.npmjs.com/package/buffer)\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### IPLD Formats\n\nBy default an instance of the client supports the following [IPLD formats](https://github.com/ipld/interface-ipld-format), which are enough to do all core IPFS operations:\n\n  * [dag-pb](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-pb.md)\n  * [dag-cbor](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)\n  * [raw](https://github.com/ipld/specs/issues/223)\n\nIf your application requires support for extra codecs, you can configure them as follows:\n\n1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:\n    ```javascript\n    const ipfs = require('ipfs')\n\n    const node = await ipfs({\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:\n    ```javascript\n    const ipfsHttpClient = require('ipfs-http-client')\n\n    const client = ipfsHttpClient({\n      url: 'http://127.0.0.1:5002',\n      ipld: {\n        // either specify them as part of the `formats` list\n        formats: [\n          require('my-format')\n        ],\n\n        // or supply a function to load them dynamically\n        loadFormat: async (format) => {\n          return require(format)\n        }\n      }\n    })\n    ```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### Importing a sub-module and usage\n\n```javascript\nconst bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001')\n\nconst list = await bitswap.wantlist()\n// ...\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### CORS\n\nIn a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS (\"Cross Origin Resource Sharing\") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this:\n\n```console\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin  '[\"http://example.com\"]'\n$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\", \"GET\"]'\n```\n\nIf you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.6","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-k5gdVca0dT0Ec7I+3wW4spvMrBMJFDUVj7eudZAIdoGnhBZdzcQpA1Byp3pKAPeiDQyZoJ6clAGvQJtmFCIhqg==","shasum":"7ff2dd581ee1b6ffd723eb5bf45f9f419513a9d3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.6.tgz","fileCount":420,"unpackedSize":794234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnEUlCRA9TVsSAnZWagAAJ3kQAJF5Nz1Pc5PDgHxfaxJs\nz+By5SbGCnAYaJQe2Ap+XUkxy/c+EgqhBJ5dhEQd+FSRT+t1R/p0IcFXnmV2\nyQqMYSWzhPn57Yrgd4t7wBeT8qPIKm1/OYNdN6DGa96womxJPbnZKBbDI92A\nj7ZnMSqstksPaarcqdnjegmRcH48QzRxNiW6YUYGX9pIJTyQaHJfVdYZl7yF\nEvKMHxogyYU4JEeHWycBFzaiXPw8in4Iwziqqh3qJGbIayqy40TZJdlQEQzV\na1B48zy67pAO5mLYHN4r2U0N2+T6MXDUXIsHCgSpui/+rVO7zN5eOOAm0Alw\no4/wJUlvGhSv128BSFug/Y/GbBlJzU1cl08bpb3AUALjF/NBKQSTxCYJUpIh\ntiQ57AVdTYvQ4DJegTluQJo2G8m9h68pLY6tvFgNkaspi6kcAmSkjIkzMEM6\nS+w8boEw9p0MknH9Yl0j8x9PTf/cjE3Hntzs0xIvwy07NGdPFckkiF7N8I9K\npDme1s1yLtqWrVny6xPP1Jaf8VvGw9mOwIhqQ3ets7YAroT1UNWlJb+J8VTD\nkgCfSfZ2NYudPIxaVwVokW/pdCJMh+WfLImmXj0UU0JIC+ApeonmCdiCR6VJ\nq7iAyZjWMpTDv2M4EV0ERyJbhk89+vpFjhwbdzNFp/INrRWDXLpwwmuNyqkA\nI/GF\r\n=eynJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCqNLR2ZW/NnbF9YedLXWqPW3GdiUFsymnF3gOZIZt6AIhAKFfZuj+Uot1buxkPLqtQ5pwrpXd3jMWzu/0/JH0ir2I"}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_48.0.1-rc.6_1604076836613_0.34484463615787253"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.8":{"name":"ipfs-http-client","version":"48.0.1-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.8+3d2d63a7","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.8+3d2d63a7","ipfs-core":"^0.1.1-rc.8+3d2d63a7","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3d2d63a7dbb2f5870e26620ce1addda9dacad893","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.8","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-vAiOVnfusTM+5BAX8xBnTlKci95d21USDRCASzKqaBmyCCm3MYxxgyFxAnrkB1bEw3FTmdzT8dX9ALQJisWliQ==","shasum":"b874687a19d40ccefb8526cda66d427f0e635941","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.8.tgz","fileCount":420,"unpackedSize":793141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoA81CRA9TVsSAnZWagAAGVgQAI/k8XAKRZs9mz2HLI6+\nCsq2NZ+wXrTJtklV4D7ZcguUH8Ysk4W/WVT+7wPACUdDRE7WkBfxiUF4wjt3\nEG+qHiEop9JLbR8i1TFKS7s3He9PkPm+OJCWtxnGltbCkwW/6o2VLvTWtgxM\nBmUjU8sV/3sNki+UiumsrPDFHAUOWS3uiiXONBdHHaMyMz7gZTaaW0jwaV7X\niQvb/tI7AKgICpLCjC/PGTagBpDaI6cDgl/EVtGtO7MN/mlNbCojCLNi8gT/\nyr+sM046Ce6hsC33gskcGcIZLTrMu5MvsF9zNHb/LDEXfADD0TNsMuV4elZu\npgMnVSiklNPgMD44rZzp4n1x+kgfoapuUyPfHvRlhdpvl+kIeIVfwPTELbeT\nGJOkqj7hWM+q9udtC+Xaq63za8ccJzvCx+XjqrEU02GTRiN3tWkBXcIO+Y0f\nXQ8uwRlllsWy0YxvcFlESZye1hz/hzMVNkVj4/FPmbX0vLvqqqIBt5idOONQ\nAhFjd7SKuCefVNnYPCU3QiXFZpOBY0WtP+kuzYAsRPhOgVu/3anZpIUQZ91d\nvNBeaTDs54WHtzDBDUXacEIJSL2dxzA2iENTaGBrRg59GJbFYYuLDRL1qBsL\nhd0yoNBayEc5xO3hRTGqblNnAKubIMwyJnuuxRQGbmm6RdSw+V4rK5sy8ko7\n74ZB\r\n=Fw/n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDr9wdyFdvRXv7uWlP+WnPkFOZpsrUKHokdpfnUadqsAiEAxfNffwvvPzTXZ24GZ+Ns/UIPs0gYuxZKvX/i24Y8mSo="}]},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"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-http-client_48.0.1-rc.8_1604325172713_0.3093815261002657"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.10":{"name":"ipfs-http-client","version":"48.0.1-rc.10","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.10+02dcac1c","ipfs-utils":"^4.0.0","ipld-block":"^0.10.1","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^0.4.7","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.10+02dcac1c","ipfs-core":"^0.1.1-rc.10+02dcac1c","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"02dcac1cbd713706f6d241bac4c6c9a8bf7c03b1","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.10","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-0Z4nnm2jQsLVmDRn/x1/kNLcKppqxL0xflgs+pNa362U/GxnVDB/EDAwLjWiOvZrYF9gDtTp+3kYfPByoZknLA==","shasum":"53d38a6065f1de0f5d3b5b4f40b3b7a2e84652f0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.10.tgz","fileCount":420,"unpackedSize":793166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpZVnCRA9TVsSAnZWagAATF8P/AvclIunsejgHjsQtv5U\nyX5UtfW4tiK5Jzb12EyBwwScKAnC5L3BT45okm/lx0NLo4+BbHTx0WfqJ3YR\nEwGLuw5TenWujELXAao0s7FFaXHO4ZZ5k8yvLrrbm208XCt0n69bfb1MdAn4\nhbMTeu/GA1TVuQ8mx7Os7JmjA8G9O9iT2UPUu65MuVWehBray0Z6A6FOXken\nS8fDy/LslRsKIKx2gM9QmmM653alw4tSUgIpKW+1KOUIZaeZ1Y6+E4Sa/RB5\n7qKCw7lIVhFlqvwNv0N6oT65hROdaY20tkBAfcnNfSlezMQzB6CmPrOMY1qo\n29xVkwml/KSPhoEz+Cp4BTeNmT94Lo1iSKAtfys46JX3Kh6hxZaPmqJYuxeU\n3oFRIHb8wIgn4KRGapWhLK+Phnj0ZI5JWJX2UMdMGokCbLmtqH+4A4Oce47j\nrMb/5mceR/gtC5WvmQA8XNlFKx3fXQV6Pd1NRFJlxJHCXo3peDs01j7qSNNi\nJb7hzk42iesAancWLnmDukCmLH+WfLy70sA7pJgg+LkBubV4ZbCpPKUfKsDI\n4AezXaOZAA55g6/i6IYHnyvEqeLGZRzWuqT12Cyi/YMQcLF72SYg4r1IXUk0\n+yIBg9H/oeCr0HiL6zh1sUWcIXhfcQMSdh3pYz82R8cITw2PiD6884PCOa1b\noM25\r\n=zPxq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHCkeqIsyoJ9qY/mfr/LJBXfuzJR63q76aQcRV76njiTAiEAiV+mswh6Vss2ehsXS5yz/wm9NOcUkXLx5ocytmwnmoM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.0.1-rc.10_1604687206739_0.553850592809477"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.12":{"name":"ipfs-http-client","version":"48.0.1-rc.12","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.12+022afda0","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^1.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.12+022afda0","ipfs-core":"^0.1.1-rc.12+022afda0","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"022afda0dd6c3825c59c70dbcff9af2a64a1683d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.12","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-J/zR4LoRrmlpVlXw0YL3U87TqybBYoGgj4bzms6JV8Swe7xhpxar2/mfAsRQoX+qeHl0Zmr2AlmepLcuHmKOow==","shasum":"6cbab9bedfe2df825ac4a69ec6c4cc3249e805a3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.12.tgz","fileCount":420,"unpackedSize":799481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqWpwCRA9TVsSAnZWagAAS2MP/2ai3jGIm8xRJXwjEiBh\n8rP3ATKq9dv5P5y5gn14YKV+6PBZ7sxW7uZrib+/I3weCkm2VIy4RNTrA30O\nbGQyC+ReZh2onGCJnxmprKFw+U0c+dPam0x6VFmDxIEz55pAMRSX1ehQEpSv\nGSYIJiFzIDmoUWvYW1tYGJYBZcoBPwrx0vogy6Q/sfn8ggGms4nzVhkfXjQc\nASqpfEkOYkVMLepWeJsuT19Sgek1wGWuG1drgrVeY+jovfJCyXmD2WF3Nqcu\nWqy/b0zNl9A181jQEZ9bKobxSLOFrK6obs5A+BCbpVfMD0qfEVXEdyRrfO5p\n4r+HADy/+dVjppwEyN7fuzrUCm7RANFEAENt0YR8WnAlhE5uFWQSMNdgvQ8+\nEp9+8LYJf0Sjxo51Z3hWFo7lYuJlSn+IzeeiE71GRuLkWB3FEv44izOqa6PD\n3qOFyCPB9YXI7UcxoYylk/KfmmH/PBQFVCRRpdq74w1gvajpT7RM0R3Ehj4P\ngRg2hxC+tVlrIP4jt1oum3IBUe6FxXe2gA2KmbRjSFFDOtrKsdrZjMCQRskG\nStQxX4/Xo2YuDmZDBjkE2nupQOgcTG9xRZ5g3dUhdEJlOVexB1orW3mWoJ22\nDtLtlFMtAqDaQgeCrhXzmE0WJsmVT7t1X9gEhXaluk0UUHYT+2ph/iUFsm48\n7jYC\r\n=lZkg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICo0cWD4iCrEeiDxpx24a2MDRlO3y93mS4AWYWWeXgbSAiEAzp8M8GPbrFKBFUGmSe1Oe6aZzMoKhfY6T7V7ISeYD9s="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.0.1-rc.12_1604938352394_0.3075937559626343"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.0.1-rc.13":{"name":"ipfs-http-client","version":"48.0.1-rc.13","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1-rc.13+d2505075","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^1.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.141.1-rc.13+d2505075","ipfs-core":"^0.1.1-rc.13+d2505075","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"d25050758405c784269aa59537b6a49eb9106986","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.0.1-rc.13","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-ueLR/QiUQ0p2tOoR/u9RlL3LjZu7uC3++O+La++O+ZJPVa1Pzd6ENP5TWasMN9o47urWokZiyxbV/hneZAGeOA==","shasum":"52d66cfe48342e5d3d7ec74d21f0814d3c417652","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.0.1-rc.13.tgz","fileCount":420,"unpackedSize":799481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqXRfCRA9TVsSAnZWagAAHYQP/0VMpeXAl9tXyU+ESxz2\nKnM8agvEv/yr3B8BLOLN4gLqJclUN5oMvyfJUA6F4sNWxELScGUs1u0tCEGz\nowGJEHT/o6qJHR3W8GLMGvWU4Vvo5m5bHLL0+AzeXDzwfM3EaASZo4Bxv20r\nXIbe6nokkoZbcKEq5ADyZYkapHPu7gbBnlIhNw8nEwuCF//S//cZ/KZp51Tm\nz3UDn5AhwYb8//FKGkDtqTB5UHH90rntQPZeRDVuTmsZFACYL0t8YbrF1nFE\nboSrSZVrmDfGn0iJIXgfZ5/FoKGMsXdmMvTdq8xbweECaZGmCFtRbkdu6ewD\nIJB6bSH3IYH5UApcOdc8LGEowktFxUZaMLneIiXedofNeZWX62Ik7Kbk9d/Q\nZDA82/C+Ki3waRhtMKueDgdtWi1ED7O2olNMkrsg5d5GFzniyE//HPZ3f8dC\nwOk7UJ51UClJeK62Nk512au+18jOnSx/VjFR2QO2fFt8mpw1KUa9rMJdTHj/\n74x7EUDZEnc1GFeGyzYkd3zmS+7nGcNRe2kOfDDMT0+6YPZu3L8Z0rJv+1IC\nOgcbze5ogYvepRESP3u+qqmL6cekojPBwchuixDC5ZmIO3kYLd+7K0V44hAl\nZNJMPeV37e676nBPLg/zktL1gG8enOhRlRRhZTlKeHNJW1cYbxCbOgW5GcgB\n5ae2\r\n=0/o9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrJdju/fhzZGnoqnB0vVkU5SCKV6WNgQ2aL8OMQ9cWRQIhAOs/ixa/7V+aYUfnpSgIi43KY3pIKyR5QsKFhVShyskR"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.0.1-rc.13_1604940894872_0.9601542050416565"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.0":{"name":"ipfs-http-client","version":"48.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.1","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^1.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.142.0","ipfs-core":"^0.2.0","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fee87c5ed915f45535be1d36b3547f4be5ac0932","_id":"ipfs-http-client@48.1.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-sbF480doYitcJYmMvpIE0kmXpCLNxMfmuvefQdVWsqs2Q+nwjoI/1cAo1OS6byGOQdSFGoBO9ybKo0yIvksMpA==","shasum":"09748f2f4dadb579a9cfbe4457077b10ee5441e8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.0.tgz","fileCount":420,"unpackedSize":800384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqXfQCRA9TVsSAnZWagAAhCsP/j2AXsGznYrLllFjfkRz\nKK822Fp9hDGI0395cihO6eDMLFzHaOaAwlM9qPmGCOTi48NhS0DnyPcCf500\n5QSpUTqQoQtqZLzJFiCVIfAQTShoO0q2MxdIDrhc+nde7Nx/V8lZp2vKq1MX\nc2tODGX0PjhjOvD9jwNJKw0cCgZP5du2rnXN6mCTbOP9SWRvJsQjXhmk+vSP\nwpnPc2onZyTSeigkIvwQGquoVi4u36kAe8KVyzE/bIAuTYc4FFZW0uK9ZDIy\n8q9IiKeCmgGungDmV9lPmDgaOOyyTd6DJ3LsFGOFkBMPjhHUI7OOmxo1EfEJ\nG7MBnjS1pzTH2JyxTc8abKHHAL3GzMx4TkN0n0fd/R5LP8cgy9CBypTab4Kv\ntIU24+hKAvHQNRICAdHzIe/rBuldF63BhWXF7Y4zgmF8GgKLuVKB1YuSdzxW\nUkdeJPy3919TOJp03/4AL3XfIjCa2s5Um/CQuEn6mH1yNk71LRsvKFJMO9Kp\nxYcR7va1MHBJYGlPcNtZsF3mLNMWY03TsxESlMb64PxwwYHXf3uttsUi6zfC\nVfkk92Xj+dRdqdycKc1Tpf7H75od4AvQpwxDd9oV4sLH17urUXL8WvS+eh6C\nC0qBhFFniiUEHHnqvidodX8Pwumh2ihNvPh+LW8SXD6Z6nKAoovwc8JgK0tW\nZxw5\r\n=IEXO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUHyBersVtKESHtFqj8j4i2YFn5pLgpDOLk5yQ+I0ooAIgIciFTR4DCP5BE26k+f+HCOQulYpMR7IU9HjzbsjLdhQ="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.0_1604941776064_0.48556353524443097"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.1-rc.1":{"name":"ipfs-http-client","version":"48.1.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.2-rc.1+500b504f","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^1.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.142.1-rc.1+500b504f","ipfs-core":"^0.2.1-rc.1+500b504f","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"500b504f363d72ea8c29f4ffa471b1cc30cad1cd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.1-rc.1","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-/f+xzJt5er5w0tpWyrb6PsWpd2b7FbtShnFl2XLfXOUdFTj5pdJn5pAxGoglVWDGwSIWgdh6yE/xnQZFI6jZCA==","shasum":"49517770e908ec66772866e63010a78375e251ec","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.1-rc.1.tgz","fileCount":420,"unpackedSize":800222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqlnCCRA9TVsSAnZWagAAgVEP/1sRBq2iUoGBHZ+DTQpg\niqXUCRD+pJD1NBJwihhOyZRNwVJ16pAS6n010eKZHzDloxnYOpf1Iuakgj4E\n4dTrsnVfgFerz7YqFmVIg8T9CsSC27Nv1kyqo6W/7eGj5hP4GwGSXObm5uQM\njIvIVCg449mbJIyc3vF1oe9ob3fEdmZo8pPyl5o32DxJEnnjUgmI/blOuUhi\nQFAGV9jf2G1Qud2wcSc2sc0BCBxyjbBiojGbJgLWnUtTlzDijDueyQzstVUb\nPIK2Ysx5OBHejKoTtybn6UpKOyIzKcaXtB7VXuopD62tvOCEZu1uCssOfzdO\nbwCleW8OzeL2j6bLCET0f8ISMG6YRjUPN0JBo4ZO9wdVG1RRcdNwBabHcAwP\ncD4j8bhq2GBqVedWLtjat8Jrj8c+q7LvnxMGmKvbZ1f3HOvoQ+iwf7/VwAYP\nO7psX4h9xL27+bGk82JDLDS7vdE4O++HyywDgemSGuttKNXniwkvIyvyL0E4\nwDK2dlXfHUjMDLEjc0BMaag9q3yVWCFvdrFwGgMNuTnYNKhlm6v4BIrKKADp\nl0+s7+MYTbwdxgI0MeFGoqICeHRgseiL962jgk6/q1x9B9Dfy3LiytSVjr42\nLzURf+UPB+IgLb++ol1Si9p9d0DTbnOgfRXPNQ3hlVS58yYkWui0ZOx6MiI9\ngypc\r\n=D1h6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDavUCkwdYvVuT8788Eh4JbvbovIwe+auaLT4Xo8/cmWAIgDoYXEFhk0K7cv2hKoohGpDbKW2h1BRwubLAC2F45g5Y="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.1-rc.1_1604999617720_0.29950632625704077"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.1-rc.3":{"name":"ipfs-http-client","version":"48.1.1-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.2-rc.3+6e383dff","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","iso-url":"^1.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multiaddr-to-uri":"^6.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.142.1-rc.3+6e383dff","ipfs-core":"^0.2.1-rc.3+6e383dff","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6e383dff2aa34816bc9feac240d4780a3f88cabd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.1-rc.3","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-H2+4c2coB+8ljcBVP6QMlf9T+V9tGedGSlQJoOwDMvYoMaVbAWIHynZ2Q9C05FILNs1yQ8AGYzlDh9FKnDlexQ==","shasum":"59d03ac8521e3e5d7c9dce58083d8115686cead3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.1-rc.3.tgz","fileCount":420,"unpackedSize":800222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrSyZCRA9TVsSAnZWagAASi4QAItiof6EeQEFJUyNRGPu\ngtzO7PHnRqfMbbxZHoCMPpQmXpeXg7SR0FBO66ISFYEhWTY2Hu3Jx0mWu8Jr\n7EO0jW4IkvPckvVFdYhj32TvgasxaVMwSgRvXTQDNkh48Um4Hcwg7sssS7e1\nl7BSDYyPxIKa0xnBHu1M0I2i8np92zNFiHH8BuaiapgsEKWDDpoB5HDEC91m\n/zRTp1rADsdAesbXlRnCNiHuXOpxwTl9v5gswbZRFoIQkNKsZwzPcH9817Yn\nKJ0v4OsbT7jwbTmtHcaiq0eLdz7NaJDEVfYYHXoX6mK+yTL9BwCGUdX54SEN\nCfeIhNV2dycM+FT5YAKzN5XXU3fu72AIk3OAfbxzxCnkGtbgi2Enl503/yW2\nH5Kzv8jopdoMLv38lpy2GAxCWcBn4/rH5FiyGMq//7jwgUp9g60xW0y9QWBs\nnC8gXAGQ842sgRnCGoFU8ZBqVkyIw/+QnTXwr1HK6tNXP8KoO3qTLqeRozw9\nSXJ4doUIQOL2Vq50++If3MsBNjb5Oh697qn4COV4B8mnNzuiRpS73vuAs4/d\nUul5vMuqSWvIXbwzTDVu6+yEcHNYD8wHrp+KjWoRs6iXNLrbUAWCoQi8+LMZ\nqWzcPepfjWL8f1y1kFKIhJgwQOakwBWs6GZ+qHWQRQHj+8Gi500PlzY6AZk7\ns3mW\r\n=BTHl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDS7+GcEkkj4Lrvhd57weNIIrhdlpMvx+zhn/zmwlKADgIhAPSP2ETFXgWa9PWYNZi/mSEbo0CD4pqFFvUAGv95P7Tw"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.1-rc.3_1605184664928_0.606155593867588"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.1-rc.5":{"name":"ipfs-http-client","version":"48.1.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"cross-env ECHO_SERVER_PORT=37490 aegir test","test:node":"cross-env ECHO_SERVER_PORT=37491 aegir test -t node","test:browser":"cross-env ECHO_SERVER_PORT=37492 aegir test -t browser","test:webworker":"cross-env ECHO_SERVER_PORT=37493 aegir test -t webworker","test:electron-main":"cross-env ECHO_SERVER_PORT=37494 aegir test -t electron-main","test:electron-renderer":"cross-env ECHO_SERVER_PORT=37495 aegir test -t electron-renderer","test:chrome":"cross-env ECHO_SERVER_PORT=37496 aegir test -t browser -t webworker -- --browsers ChromeHeadless","test:firefox":"cross-env ECHO_SERVER_PORT=37497 aegir test -t browser -t webworker -- --browsers FirefoxHeadless","lint":"aegir lint","build":"npm run build:js && npm run build:types","build:js":"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":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.2-rc.5+8ff134b9","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-buffer":"^1.0.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.0.0","cross-env":"^7.0.0","go-ipfs":"^0.7.0","interface-ipfs-core":"^0.142.1-rc.5+8ff134b9","ipfs-core":"^0.2.1-rc.5+8ff134b9","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","it-pipe":"^1.1.0","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"8ff134b9a2844dabb27bef38ba3f241e2c72f78e","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.1-rc.5","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-SJBskwJcwJa/6L0P1WQ9hPxRWkZlHr3plO8VC/t+ZzLxrYxV8YY9Smm/W9ULvKl/BHe/OUDDSmW6Lr/H/lRVPw==","shasum":"d313bc348d080694c67f26f075dfa0a30415434d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.1-rc.5.tgz","fileCount":420,"unpackedSize":801489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrlBLCRA9TVsSAnZWagAATj4P/jTJucRjY0MZaG5r02wT\n2xCIfInIrlc518192M2Et+g/hOLVIGxa3BUZFae9vcT8hKhc1xG0PZph/7hm\nryTMndm9DXMzw1EVG0zM0mYm9lPgSN5Gm8FWoQlN/5YzmX8iKSLWoy0R5Zem\nAB5qyTbK7L5ByMHnLHTOOyU8v2pc+umovWktKFfdvdsxjS0oi17M80EmS2SS\nfLunI9Fzi+9sXr7os4GMjLcs5npVv/OZ5yrb/BCBUbcHAyBha81/3tX5rEJd\n7dR0Np9OwmMNlXQG3cpUVDYABtnjNA3gk8jDF+aYC4DHByR4pK+2sFAB9TM3\nsH2zyj9Lo3PkVaEkVmUFDlzK0G3JN6gBM2EdSyhKwmoF/2UcMRyFOKDvzGAq\nZGKkTIf3awPcFpWqwNNOfecaJCcYGUTjv3hJYbWUF6BBrTmIpOUlKyX82itn\nUEJzIOhhqyqS0HDa6O8MhdSzi6uhIN87Sd1g1D+F4OpU1RZ0w42ppQP4ZCLY\nvgkdgrCbRRlmhz+9cL1IdSgdTri60ldiz05zKdaQmfn/wVVz/RQX5E7GpYyl\n/nrfSOVpIzcNhzDp6edwi/0Tp5hdHQam3PICNd6PLV2ew5Wsgp7/gleWxO/8\nUi4COOnrMrZ5ij1xvdHhE/2MhTneq5nFHPEdJFAnnuElp7d2E//SCaXbFrI6\n5qe2\r\n=xoWi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC73OZwXRBPoKo2I8a+ab0RjmL7cIzHLGcxEOwX2sUqkAIgLadgnV1k+HSmqHHOSrtsaHbnn9hUy4L//NFN0M55aSA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.1-rc.5_1605259338648_0.07656210277718412"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.1-rc.7":{"name":"ipfs-http-client","version":"48.1.1-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.2-rc.7+d26681ab","ipfs-utils":"^4.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.1-rc.7+d26681ab","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"d26681ab35601d9449d71f2ca5760896418e3e79","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.1-rc.7","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-oievbiMHcGisB6ORnWcZ1R1cMWB3v7P+ul5QGUJH3rVKZzT04jdGpZq9DQqsRIeHHJBbCvf8cqpt06OuMSZ/mQ==","shasum":"cbeb1ed55a4e4d69d35fd3d0d96be566e5704663","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.1-rc.7.tgz","fileCount":420,"unpackedSize":794277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfskjPCRA9TVsSAnZWagAAi5wP/jXln8SYiBMQpLXY6zvo\nNTBU8eCPDoF+MAI1PBOOXxjQqkDC7dXtRJ5tg3QArXkmS+BUO2tYqLSGTls4\n1gibF/KHWILG+6N/Bx2oVsn1OO8HgfFtM7d2k0+sBEXwf/oH5SHsg+UaRtep\n/x3/4FKMLId+vIXdZ02OrYn09dK3WpGvtxN4TWgFQWHgyCtOfDoQY4dhba8W\nYp84AbAVFFUCxkgkNSo/p7VPKctfy6sQcocfCql3k73GVxfFKHciHsz7jxM1\ninouZCQbLm1n7a2Q8Cf7hYhdYtKiobM3d9RCD+Bit6iw2nM1XmsqOREeZVsA\nOLNPs1l85tFhe4LaROO8lGeiLvW0WgMjsUANVyzlYqk1xlRuBbGQS+1khleD\ndDzMhI6KGbiqddyR8gnE0NGNfbS3b7ajNXSuxjxlkJUtVHzyXXQtwD56vEXd\nhI16YqCgXSlc/0WpAnokQUYirIw8Pu35BM+RCWDvkXj5m7M9I5mTXhReukZJ\nlGMfNCzmD0i9v1+qbg85nunAc0tE2onmVbOgSPs1UIBR3BmXMC0Ff2B93Gyb\nVivMDsyk55j0eaTScpEz6+R30xeqI1Fy3gdXfiJLGBTYtQefmKHT3OX7CHPR\nUJ/uBmAFg/fRMopXelt7XucTimExuMTmRR++F0vqcBv+fHvL+lzHyZ+LrdK3\nJ7TG\r\n=NlRt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtB2SGe5NitqPGxplmaNa+S3v3/y2S+Dd1weYfRrL/NAiA8A9gBfWxuusKpwPYtXLxGIvR3JxQWIgFAaT96XLNJsw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.1-rc.7_1605519567400_0.6373845153722346"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.1-rc.8":{"name":"ipfs-http-client","version":"48.1.1-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.2-rc.8+4921e9aa","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.1-rc.8+4921e9aa","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4921e9aaa627c6fd03562c26cb7dcb201d6af936","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.1-rc.8","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-sGFtDd40H1k/BOXeCcZMwl0iYZtkXuZZ6ROFs/BSJreWEQhcjHp3/w8wM+2AZ+LAAJ4dbcRruk71puFvERbeXQ==","shasum":"1c61500303ffc333c8c885d35fd4db8656496c27","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.1-rc.8.tgz","fileCount":423,"unpackedSize":799617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfslaDCRA9TVsSAnZWagAASrwP/3RKUoPAngsb0Ne8nurQ\nmb+fKnR+bxnHG2r8Rp5tg8LRXwxDso6Dc1O6BLprzOKV+O2cW+p18IpRBQ01\nmlSKjd/qhPR/StI1Fubi+aB9Cq95Vj33MdfvDhMLArKsjXq6++ENUOAssYTn\nVIJrGbee3k7vCGmT+rfjEWlE3BdM+7K1lscQKDrTSgB5JpJ7VKfzKhM4rFgN\nnVma32UqsR8u6U/3zAtycr2v+E0vUnXDdHvoga2vU1jG8ETDyXNEpB52Pakt\n4KhK4vlzQcYK0BqrUkuttkUR92q54w63k35dHr2hZ2Hl18lFTt6B31Wg2XTy\n4UeqJ/r386TZCgEZI88UINkc6R/uJACjNwAitUP5zVeMtQn/weZ6iN8/AZAh\nE94iLIceQlGK+yBwsc2eJzRgXXRlAQU4Pv4U0u7PGn6XEh7sO3S3Nn1Vdq4s\na9ATt7U91cubbOZemzIF0T/vOlnXtIQaMvIbSwCjE22/2/600Bhc7TNAvWTp\n2w4ASpkcAHnVa9Muw8STg2c4g88oDDRpI/pDHzuLy1mRFw9X8bQkQQ+FlydP\nz5r5YYBYmdA8t09q97J3tgDDE4lgUjMYlYMaf2lP9x167e/aFe6r8bTLpIFu\nRwPj47TktBw3VaQ2vxEIO1eG2Rp63XvzohA3pUtVT/B/CkovG3/uP2BzE5cr\nuMB5\r\n=hFjO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSPYBV8I4zI5Nen8ir//ceXooBMcPrLJxSNeXzY9uOjAIhAP7srP6vpk9k+LfekWd9dnxW4ppfwj7k2a/651plTOX8"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.1-rc.8_1605523074726_0.6240087331954445"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.1":{"name":"ipfs-http-client","version":"48.1.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.2","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.1","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fade64683d1209971cd7572ba1b556a275259541","_id":"ipfs-http-client@48.1.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-DZVm6EvB3zCxuvEwW5blDKigKtvAWWzPSIQEIUeWr04qzVThEe5eYK+Siu1qxrpthnBK1fYxS3okK2WI4kmluA==","shasum":"a8134ab186bc6ff88e91dd575bb3d0600acc506c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.1.tgz","fileCount":423,"unpackedSize":800116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsmJmCRA9TVsSAnZWagAA61cP/iZq4f85z29F9RYSIgW6\n3EHV7SBtVK9mCI4Ha1SMaklcckZmNtLUUMYC8YU60BklksMyqs+5JhKPfINC\nHI8ua7rICYn/q1gJT4oOcHRPrsxbhyKRcV1CSEEKRsspWN5tlB2qQpK1x6vK\nAGTRnwjWSJMsPBNPN8Z1dsWXvLZjwn36p/kiDdv0cZc3avgrm9SLz8s42heX\npRbCjFTEWViSka82jcJPqHQAzGbXsemx6yID2I2yDFMsFyaxAMb+J9cjtV4O\nHTwwf1PlDL3HjSci26FqzsF+dfBbEnMJvn6V01k1nW46i0zCXEnxCNlCYsL6\nscFO8VvzqgYv2EhNCDkZWqjXIuyRD4wWZNxFSq7ffII+maw+R9N9bwQ0mRFs\nLeVT4qHKPOMWivs17AiNvaIeatMqjnz8AdAL+/GXDYgEcq5ymn9rycMEtYx1\nIxU1KIg4nnW7+iGfxe99vn879ob5D8FOpOw4NoI25T00nrhZgsYNhiqHFCrG\nFvjW1MNlfoLOLtc37lnDCJq9dxb3fOv45C6bR7uTMgiAylTb6he5DC6Y8NWF\n03fsmVk5O1AH2Wx1Znh56eSpLuAlcfsNevcf97uWMFrfPBRs764jagJi+7wL\nTNW35r1M7o51gfjtfik/uG8M/nVsTdxJf78t4nZZ3u8N3HfHyD/PM+uzWxcn\n8CAg\r\n=WZwr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAy7RDmxfda/E8k3ywHx6BE6Qzyhz/e5aQBCb/6eNpXAiEA9qnlLIHPmMLxpFQcDM+v7ORgWVXbU38vqOYvmrg1H4I="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.1_1605526118047_0.39158390103656493"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.2-rc.2":{"name":"ipfs-http-client","version":"48.1.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.3-rc.2+c93ae14e","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.2-rc.2+c93ae14e","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c93ae14e65b8a9ab4fbdad1fc69683db55430178","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.2-rc.2","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (linux)","dist":{"integrity":"sha512-LQ4x9npjcD7FgUW8QzAw1shnRWzBNY/JdIExEvEIR3nsnxvrKkpEosUBV2IoasQMX2u311JlBr3IWpwJ5W3lOQ==","shasum":"854c6678724ae4af6683c551842c67650f250bf3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.2-rc.2.tgz","fileCount":423,"unpackedSize":799940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsnyvCRA9TVsSAnZWagAA4DEQAIn3/ViJnx3LfHLZ9+wB\n3d4ldH3wNRKy+rdOQeMUZIXh3P+rr7ps5c5g+APJJ+q4Za0JRxwv+Ib1Qw7y\n+lV1kvLWkpjb2BePjswM4V0uWvkQWwgpZ5w1+sOdouQsi3nQT4isCkqvN4+v\nUcRFFIpH2ouL3uf8qcbCva6dl4dEJbP07uXVNz43GFYrgVN5StCaJQpD4B7J\nWV00046BEx5aeyMYGMtMNJXxP7aXhZfMYSmrCu7a6Ryrus/XwJKYzB2ALYB1\nlpIs4dZh0Ko7Vl+HPy3o+RtC+95ol139vTXqUEIO0TMZ+VveE4vluVazgOW1\n0eXRDMxh4vij84XJWBjMSnweWwId7UFZWXRTEuHSBBXQHBDe3U9UsUkVzOUh\nVCkmZOrQIRwnbDvlotkoAvJTC6Rxa1O2cKNGXImhVa/L60jqxKkdok1AYULP\niPG0VqJq8gYBhxCNvdFcOziHh+CsBPRhOAYO9qFPp/gm4Ita540KK540buJm\nkw3GwxT2QLThFoc1WHzVKSF5nkV5o4q02jg75q5ThO4lcJqgNFrT1F5VfiIu\n9iz5k2TBgelkepyhAA5szoLa1jlgsffJzSku0gCCPTRPjHiRYwsutXb6KR3v\nsgmx7CypgRaY0tKFsfS3jTEDUPhs7sjrtuVYOBsb6RX4Vqsm51Cn8QnS1v4K\nosvt\r\n=j1M+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3YRI23yfb7aXKmUMQRX7SbknkEX40LcIOXJ+tXzo0wAiEA96Rkp8J2MFmwj+zCNs31R+5HGqJ+F4Pp8UZ243qyj6w="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.2-rc.2_1605532846816_0.46194767757474664"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.2-rc.3":{"name":"ipfs-http-client","version":"48.1.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.3-rc.3+4fde9221","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.2-rc.3+4fde9221","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"^4.0.3"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4fde92214ca8ddef37d04ccdd2efb3a344098b3b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.2-rc.3","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-DpxpZBdjBJXwNS04zKgxRHyxkgg3zr5cfiE02IhQQ/Qfc4YDY3Ln21vlqsg0rzCZdCBMe51ZCEUi9YiUbhKITQ==","shasum":"a29a6b69faf9dc2dc801a35c437859378ac903e0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.2-rc.3.tgz","fileCount":423,"unpackedSize":799974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftRkXCRA9TVsSAnZWagAAWIwQAI7sak04R8/iGQEk5MIp\nuvYo+ARbN3/erDF0y047S92fv7qk+BIFDBHKjmXZyX7PoGY2aVs1HQThlVpX\nOoZYk7eXzApTEOV+YAp54mwQ1ymz+wlqikH9B+m3psWXJui46rOhc2DU6PGC\npY7R0fD938ABsaBUa0Hv4A/Nha2jpYedsMoGp8t78jjTXTENCbr6niIjQuSj\nnF5t5y+lSsifgG64Jsx+mufgKeHD4X8DemaGgsgpSeU5KJMzgMVf186IQJbC\nHR9bXOZWW89HEOfXDhj0ncys80I400L/zUa3NSp5B9LZTFOX1DBHwOAyxiXc\nh0K6hA+mr1WB0Vi/RGGVgjQo+p72toleX9KdJ9MExgbe9ymzrQyPFPrfRGYH\nM3qNn4B/PeX0hpmpFOXE0ICp92Qr8gslrkRSjmPnHyHsHgUO3Bvnmj3BuMm7\nVlVI40VxXq8dNZNv1RWDPwwZe8rPkMkHDenebePDnex3IRMNNAwsWvrFvCqU\nCJwO2z2Ns4BTnUIGRYB6t886C233SoxBM8nQs+OYLIQ9Q+0MK/0G6C2C+M2v\nDOUmGcAlqrl6UyyYN2wGjDHVNWDUZT5M7l5Dd7DrW2NnYtNpxCOzu59srTlN\n0TIuT2GQzA9HenUD/zYNAw1E8bTtizwfxrUBcepyZMTN5tIQBun3qaTr4Rs8\nHNDA\r\n=8g4g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUGptCSs92eJVU16FePQhqQjKGKE8KpmKdDfoJYwuyqgIhAPTHJ85nEo38MJm/SUoTlxILev0NFzgOTwMmcmm9yafW"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.2-rc.3_1605703958670_0.9580903703957675"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.2-rc.6":{"name":"ipfs-http-client","version":"48.1.2-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.3-rc.6+4281b404","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.2-rc.6+4281b404","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4281b40413165595e691853df3cfa19a6c219bb4","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.2-rc.6","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-4fWyXOhynTzQC3QanlgB0b1AFUns97wzfvmScX5Aq4fuS9SbB5rc/ZDEfSK6P6/0d+fY85TRLFjJWdfg6tFc2Q==","shasum":"a999476d7a82eff76fcb3e71e9b1d4ac611917d1","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.2-rc.6.tgz","fileCount":420,"unpackedSize":800914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuFM8CRA9TVsSAnZWagAAoYoP/RZ7FFFYw1SqIKvDxMyM\nJ+8khx9QsSdujFsSDiVJ+VxG8Kj6yMBZT2fTjyB+ZyEu9THBntfqMlN+TacO\nGSCoc+qsefIhioPykPGA71L+DDldB86vSsgFxtZMHf+d8g4+os11Mrd/bzfx\nbm21BSB7RpdiyNECZgKTxfNqjvESNbknNXe9NLPN3ASbwdcsK0A17e7VoDzE\n+oSxR/i7jbXLebAbiplHUaIK4fx1di+uCMX1vm/Gtx+NhDKXIBSdhdYX0Ja8\nL7yqgW0F36Q3AYckxoCkwSvy0Ip6OrbWFKzuPAFRqEXav81I7DnI6uYSbEss\nT7sHngQ9+w8oxgpYMYym/Ipvsc1v/jLsUBVDNoGvW61JmJzs5yNChAs4qBT8\n0ORoQOH19OMQLyd2Ch/Hv+ahWlP94fRAog0A6yY9eLcRQXBBd4MPNl1c6S76\nvICvgs8lq1eBDxkCdAZVI8nv/gU3d3GMufVIs6MS/mcIIPgM+oZAbqzKHy7m\n14E8aT7cVmJXLN2PXkkEqwA9dvWMTPjjEqNjHxnMVCiLWP7RjA23aaUBftPX\nfoW4PZayON8ENGKQNZDXv1Yk0tDmvgIlO101gzHdtXbapMRbcn7tPLwCNs+O\ns5MZ6enOj+uczJy2r3SUfdHK68l+IIf27OcxbAxDYsWkqqAyBCpa5WMj7IUU\n5qko\r\n=VqIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkh2nHUNbKCAmUFBvmasYrULfpxXcYqktNjlj9iN79AgIhAIXEiLgpQV4/3000INycssSbGk/nGTD5XeH/96AD3bhp"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.2-rc.6_1605915452497_0.43413710478866574"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.2-rc.8":{"name":"ipfs-http-client","version":"48.1.2-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.3-rc.8+406667af","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.2.2-rc.8+406667af","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"406667afee7db879ef505badfac8b0745fd17646","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.2-rc.8","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-u8gVJzD1ksTxrFxjaJkMDp7H0OHTzzWikR++nTLtlfpaQ7I27UpnS0LF83j86BzFxnS6D215umYv4d1my6WR8g==","shasum":"ed5b05cccfcb3fe1bdfdf8479a917e501f0e30dc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.2-rc.8.tgz","fileCount":420,"unpackedSize":802366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvg3bCRA9TVsSAnZWagAAe7oP/R5qmF9lmSqSLAx9bBAz\n3RPLLYYFTr8GWaYm1KRVOFycV/j2CWSFPhGghxXCOuUSqPgINUegJfqZzZVv\n/UWwIV1NTOYH88GsXZj8A4TPHaop45h3v1UIbOxH1RaYjCFnFLFCl0ykjNRp\nq+QkvXnDxZulmmjDRvVAPMAWzdH88Wm9XcMaTfXXiR8imGB01tX2MPG8y4B1\nHo4atSnsfRDVrO4lo8U6pMjbTgHoPXN/VyjvEUA4LukWySn0UOM+OIRWzDMR\nzOy8QeSlmAJr3wjIxQuPrRtwA7W746UQeO8Iw8dwHojm6Nf+s3lQnompvJPj\nwzrjrFxFjkwkZ/LNdybgnrG/EEHhvrOhQNwlGExaSLobaXtSWBqR7UJz1aDN\niiRUNef/79ZS2/C6H/tgtCgTGucK89WbtDNZGzZhi8xD4JMN037+Egm/hh9u\nQGRcKccp9alyCdyfcnPFCboPIX1zoeu2t0wNe7KxtLOVjby4EJ8i17aVCqxv\nVpYW+KOsa9NYKX9h9D2NUe98DQGLqrtK0R2szNAyGUN9heWWF3JV0/NPSfIs\nprZsOUt+p3mCDeVHvHkIVCxI9eBK5TTHGvvokOyY98w50+Aso7MYe/PYsZ/D\nqWLsh2NGMDYnAQwz0K2sJGPjs67e+XJkpG7OZPod7tGYSd8g6lpqFvdaVXR2\nHhry\r\n=dSMm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIwMRKiA3LsWq1fHLVs+4Z+9lK0um/GYZnNOHKFNRuUgIgS9BHjGDnJ+/lpONuSO4kNKYEFyY00pds1atckynpNjE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.2-rc.8_1606290906749_0.051642450966448816"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.2":{"name":"ipfs-http-client","version":"48.1.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.3","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.0","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6e660f50d3a4611f7ef909804249d3b0172e018d","_id":"ipfs-http-client@48.1.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-eeqHhjYUgPNBKxkS29xYS7Mtc9JxzLKI9Bua2nphB5vG1l6W2hjDTntfVl4ddY07XqZogDu6yTL3UsFj0WJFeg==","shasum":"7cdb731e792e4d235be1e19726ccaf12e55ff0b6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.2.tgz","fileCount":420,"unpackedSize":802713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvhfTCRA9TVsSAnZWagAAM50P/1IkkxsFgxu7haV6ucK3\nZjQjdw0GKWQj63ZGD2KaY5UbLzOHuM1cVR71nTMEQtWzo/4XSADlj9H9bb/z\nUuO8DofeRinl8bBTQDJtvbItk6raavwYZz7rjgckMQJsERHB6olgaTeDQa8/\n4rmTz6zioVm4nn7VkckozQrLTq5VLXKjEMSMQ8gCXmkFqroUJq6xYVrPuNJ5\n9hDoYFqWO4cQ7jvf4DcxKNBNP1HdxuCh+Iijar4hnioQoHCxjZyYc10FeJel\nQzpC17R1EquESc/6pf/DfFmFINgY+iXTkl5baEJ5DES0hkvgo6jlTcYLkzo4\nASEfOuR+49L+7aeidCSwuaGyTsB8k8ZIBAHNs6bvnPcbU7o3FD0g2+ZbDYQN\n9P+ZewlrxojeQg3fnswgR4yqCMX5nr7i8XEUkgtF39J/j5eWdrQNyqhfYnJ+\nleGYmLpQMEppKAt4uCo6Q4PDTrMay8WHbFmqUTf69ikwSeFrEvpoSObh8/OM\nXezsgEVtiGWMSuK76+R3zDv6HmuMSceZZn+mkZSYxdEYCNPaW1dB3zLT52KJ\n9skrhsLFvF/4wgEm3oRAZI+AkBE8anqFoPB9YgNQh4gw02j/pyBjwzyY5TcN\n5gsHXQsqW0aQN+upazCarMQj11XwfYP20oH3ibCTLugx1Pcj+aiCOdEFpo4Y\n9MqS\r\n=bzHY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTYOFLQS6H9ohRQJaAgMnUEX3a/G2zMsbYvHu9ccElNgIhAJz4mRtgzev1c1vKQME+pl0rc6N9l/XvmnywrN3HhPxn"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.2_1606293458585_0.8517912958286225"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.1":{"name":"ipfs-http-client","version":"48.1.3-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.1+bc6e3890","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.1+bc6e3890","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"bc6e389099df351b06772e10fea7923ebb028f66","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.1","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-zr+VYcQke0tBw5Clccu3n4MsPhCG/CUEC/ojeq4OqKmDiMegCl27rXUhiwt/Q2bxHVbiGkdQaqM104L401s/+A==","shasum":"674bc22a951e4321bc7bd7f104130dfda38b23b2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.1.tgz","fileCount":420,"unpackedSize":802545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv2Y2CRA9TVsSAnZWagAAxIgP/iyTvKBIrY4lkh5CaOUi\nwN+FNWE0HY3e84yfxPCgrETPyOS6acIld7I+x5bUMCMi2xWEpIgwgHM1V/PG\ngyGMmV5bKld0hJRJRqRvGJwOOLj7pjYwfxWggJ+fYHPuMNQK0ykv3z4WXfJ8\nll+ePgDL/4sDGdjNM6odWK2F9lANzEuQE+4/ftcus+23mD1UzUwDsmOm1GEu\nJH5XmaM41X87hJzbfIupduM0k+i0WDGZR+sdlQZa0SqXFbuZTb69pXhbZI7Q\nbZuDBoFJx2Jcn53b5kofaCE6F9CmJeL7s80SW0n4RPgngcfqiyNNVzEbgnC6\neCezoZM9AOr74Tu9IRluyTuC4ZEqISsL+tA93BSdJyPrraWCWXhac6Jsxk/r\nccCHd6xN3ldbmkhNeiepLga81x+YUFDtUYML8Ask+WX4S7jc1qI21d/bq43x\ner6ce9/lu0fxILQGMHSre8anSC/p4WfkbTduAiQ0Mf5KA0qxBuHLrLB4Ns+E\nO+sJeKC11wD2pLYhsdwL7FlXJ1UOj6DWA80Ou+BlxFJmzyOhEJglxbtDv5nD\n74FUmwHc2SFMOrLPRg1h7KiLATGzQeB9eKr9WmuL6rETAXJrweLSx7j8TUb8\nX/74BpXu3X7mdXgnNpFxBCxVZm/oDnkt83uiu9Aws+55QdTKJfwGnrleK0iX\nScxX\r\n=rUgV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiiBw6r7qVb+GZZu1efsaDL3LItq/nll7nNzWLhqbdkAIhANTgdDe4I+0KRoYJXN27IDVNAGhGdFKY9NhQwhM/+8cb"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.1_1606379062364_0.7232146015816285"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.2":{"name":"ipfs-http-client","version":"48.1.3-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.2+4ed94928","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.2+4ed94928","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4ed949286dcbd7590c3a55880cfa9f3ff6a16f13","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.2","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-q4z90O2/GvVQGwMsZba/8ADfB2v9YdbyIa9sDNekrVha7aNTjpC1sw5ke8dl5Q/vSRGQY1Rl9REgR4fbVscpyg==","shasum":"0e36080b70ddba74b0d801aaac976d123a980433","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.2.tgz","fileCount":420,"unpackedSize":802545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv2itCRA9TVsSAnZWagAAYI4P/2wQXEbfdMRMpwyOJicH\nMpVd3SCbplcrciA/FiVDl+9rZ1pBRxcJSOMBMmbmJSL1Qh65Z1WsyqwT6q3n\nBvx5uVJ/a1b9k+lAhljQVFEr6KilwsAFLhB3HXkQ5JvczAA707kMMTxtYMxV\n7sejKvXRTMIxk0Ng9wPo4cTFBpo78yotl6SNVBR3EdcLIdEsrMNGw97laV3t\nGS1clqVV5WJhU0UbnrsCBz0VEz1WHOU6Exy3RX2Y1+WwkyiEsnZ3gBCKnlZc\nwqkf84HrOHNZyICpj68bSt1t9zVi/uFUHahFbBiR8qTxGHedxOh912Yn8aNc\nlxE8oAE8072uikNurE6g0lCJh7heegG0r9yXmpwRZ7tu1dua54wmVOiKWBDN\nao2xj7RJ1TAxXHZOoiGGpcfZj9GTQ7ysskNPof6oKutbU/dE8m66pFBnovU8\nhI6XmNvxNzZRsYeZJ50J9ipMloXSzQrsWMm3OYjgcOOjYSeZ02ig/QBkEol7\nMAz9gxTcyWXgFwWcT556/k4lHUIM8XIIJIxNh3UTRFZVNH/3zR4n4PlMAaPb\nL+0q5WkYGNWWAB3JPdBVDlpSQw0KRiw9Ne/Xb1bpOBMio6UqTWAwIxZ0apRH\nWvKtHcJsJ4orkad8tFO3imZzSkSYEOFP/vb+qhled5kqZXA0bqJDVKL/gvCM\n4IwA\r\n=WbQW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmQqpBVNvAzT0I+DvBor28U2tv4oB3uIASoGpgBSaTaAiBt0Hf0nP3B5JdbDqr4qqXS9UWokUc12VP4OpZ5Ww3JbA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.2_1606379692573_0.6679194096808962"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.3":{"name":"ipfs-http-client","version":"48.1.3-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.3+0755c253","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.3+0755c253","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0755c2534cfde193e50c9b490c8717ef8ba89c63","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.3","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-IpDZPkn37+mdjfgQOEwyMmBVxMpWImMKo7GiVS1F58MB4k5jD6opvPtrT5G50bBtWn6FgHs/efg0FJN9jhPEoA==","shasum":"80e6fd7ebf7e6b4d7dcec005523d0142c2e01933","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.3.tgz","fileCount":420,"unpackedSize":802609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv8qHCRA9TVsSAnZWagAACjUP/iL/D0tRmq+IxRX5Csz0\nyTLTApzlBCwAm7qmfX/t4rJeqHFsgaiZTaQfMIfzvRtGu6q+2EMTVfjcTSI6\nPmeWwrUzOohrhbZLUp6+4VGCU6EgkjoZYVwPJEOtMeBx5z6LvWESTWIdDITl\nTMdW1JPqqQZmbRLqb4W9Dm4y3GResDaiVfD4aBNEqGI7cqRpGPF/s6wyBL/N\n+EGckNbNlbgVY1fka52rm1x1Uz4DzFJYdwp42P0HjoA0XH4wiEOWzLU3G/7g\nMZXQ4JYVsc4sD07LWJdlhtyXoGY4hbRJ6T1UCWunOsObau4DiOd6XVa9baY4\nuxaYW9yuDsaKOU3UPUMAMBjFYCYoZYklfTEG5u+0fJAkd9Wnl4HgvZqeedkF\nddMCu9I4XR6HuWN1UKqg1BGB2V5ZMj0qQ2fN14lqbl/1qZY003c3nZfYH7at\nX62RnSnfoZF8mlpo2cNVMdpm6yNn5FzgW9D2A8ebmQKB9vMLXHyJ9z7TCtEV\nteF5DtyMXAmb9vQJTUSPgY+JeH7F1u79I/G5WdSqwqUzBX/PneVJp+/P2B3n\nBTWH/l6vSIBkrbOBexm1QpIn1wEyM/Lnxh5HtOnZFG4Z5nlaUntMCC2wurH5\nbV8xMeYT5uBoXp9up3ULWSbEXAKztIRyl2+5I5pbtJhUA42oYj4N21RCiCkc\narEb\r\n=e+s4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDveT71LFHUIIM8AcA+DEKxB7r38RJ77h+X3zsrgiVl3wIgYXRyvcCoRrn0R0wAgoG43VJRHyVIs4O/OqXh0FumRFo="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.3_1606404742713_0.8355430595184021"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.4":{"name":"ipfs-http-client","version":"48.1.3-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.4+06712481","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.4+06712481","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"06712481604985f60a3d5d832b51e174e965c6bb","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.4","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-KW2ECKR9OjpWHB5nYUavtJMBZhJDhwDuhne6Q+uS/1IPgcjPVN7zeJsiNDoktMBoSzFoLnTAYzZbiJOi6DJCUA==","shasum":"5f3786e702dfb10c22dbb213a0687092beb4e396","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.4.tgz","fileCount":420,"unpackedSize":802609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv/eCCRA9TVsSAnZWagAANA8P/i9K8YCveA4Hs3KQTzuI\n+i4xwY9P/Ot+gP3atSVQzWuQGi3WJUmqWBqGA9hrSoCgYcA0oVtcIWvOGDxP\nhiX7abE7Ypwi2VQ6w/Gi/sZGbZ+c+CB9FxBwmjaNfsBgss57exx5WSEg9aSI\naFmI8joqQ9ihZUvRCbUpRpbc4NQ72AWsHaG7ndiuF14VweWkV9mNNcbPAs8o\npDDkjiLgNhC8DHcVWSG+Drzm52po0qIo1JMR0v03uhJ2HtaGKQoxNXa08jJP\nA0YG0UuS71Hvvbpf3jeFjGu2Z4Ijc8t92Nzx7o3UTQcg1IpQbhU8YyZYJDy8\nycfnVxsFA216nKK+gjy16qGr8QC6yySiGKZxM/oVOIJHstd41YGAzdMLjhQc\n4z2l5auppwtDtaTsYwDZmZrWH6S2CWYqJEpCHgF/84wbeBAiC+xuA4AMnMiW\ns0CJeQSUOBbCjtZ0IwSVaMSPljVzUSD/TO4bokFX1KiCGzBmihMrHwY8BJnB\nYR+KUofWivxMdswSm1m27aaBBLWCLbO9zbvZD0C0Zpxqf1I6OttG0paXvj/+\nakqOawmNMQjMrbU2MfIWSqTQuoZ29v5pCO55cV1+Dm0OeIy7HvZj0SlkPcIs\nWNgK2pYJwUnGjkuoYowKltNEjVUrcjo06NeTjapcfE+8yNvSuqh2dtTKG7I1\n0f6J\r\n=hyoZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClzNlybYwPiuDABNT2ugeGTithZaNFvqqQ5zsOJd0RqwIgWekV96/SOBvywuxxW0THKrEpz8Wf7t5WXno+H44lc6A="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.4_1606416257880_0.9439596990952634"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.7":{"name":"ipfs-http-client","version":"48.1.3-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.7+a4ea8fe4","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.7+a4ea8fe4","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"a4ea8fe4ddd0f247b7bcf42dd78a77c988667011","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.7","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-5SNWYv8i0Pf/ff7/0aPkOLJxdzuuCGFJd6+ZCKRSMqhJM0DBqAlVRN1bJpoHXCn+nSpQvENHHxRVkq3fvPQMlw==","shasum":"522e5c33143d2dc3dc82b278d8113a1790e0bf22","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.7.tgz","fileCount":420,"unpackedSize":802609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyRp5CRA9TVsSAnZWagAASGEQAJiPoDjf2pb1xDTD/odm\nilmX0mZY6PPUDdXD17bViLgUjCniWEwkU/GP37ELVlT5nkPsx1ThM+FyO37B\nO0BiDn3P8qA05fcTMpaHarheUpy/Zr9sIKUbOhgnUW0iNWBgXRdg2u0qdoHu\nNcR5bire5tOLxIc3vwVNfDzfbArCVjYm7djC2MvQE6tFUJ+hvQP0AoTwBiiA\nYZoz3Grg4UkwwS4/XRYK45rMjszx7dCmm7Iek2c6ZtbMYZdxURQttxqEV5PP\nAoLOwOiQOSXvsmcrciKPTdkHgUuojWR2zYk1dqH+PO4+hT17NHIm7RIFRHbc\nIcMoq3vaZ8K9LvWMCN8tIXS5MmSC6ltfjryysf7CKyiJhwmu7DPb43mgYKuY\npnL/tWKp3qf+jz/PKJKoirgS9De3op7sm/2UyAzmbyjR+oLjHsN2pDDGtC+6\ng6Pdk7tNSMwTkDEIt4kGi9wZCn5WwYFD48juyBiApHMlQCCS7kSO0FxVAdXO\nrHzoqJKTFf+n9FXUvjAFj7LINV5H2y8k4A9j0extWZcsjDgMijPxqTx64U33\nDgfTh1ntr7p4U+lnqkjkGCxt96A2Lk6WMN9D3wk3Nq0pPgGYyHL+9rjm+Gj9\nrwEmz1F24f53sv+uekvyru5gYjoONwJpYh+xwKT4jx/xGz+ytD4sr/2HM1QE\nwd9O\r\n=AMER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV1z98ZE8dlU/Blmz65skCNAZmkQjl6/oQrmrGvxoiRQIgN5ZNbVnHjJHdROfKeTVXX3SlMLx1ihdybWZCE9DhFfQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.7_1607015032979_0.6125231078605515"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.8":{"name":"ipfs-http-client","version":"48.1.3-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.8+8ae40100","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^28.2.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.8+8ae40100","ipfsd-ctl":"^7.0.2","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"8ae40100552ec4a389112e4dd4885904219ae4ee","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.8","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-lagAI/07H0toRTJR/G2NpkWRDO4gf4k3RkeMVZZksMJFxksv82AAx7wL/R4TvRkY34XmJoOZob2+9MueOkGpNA==","shasum":"c6bd591109f145c4a05be90db032eee8654d27a8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.8.tgz","fileCount":420,"unpackedSize":802609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfySC+CRA9TVsSAnZWagAA0Q8P/33SgP8riX/WS4DDd1HG\n5Nq9P/a+T2UWq7M5eW0bqqYggK4A+yVmpnYWrWMu//FD49sZKFIxSBn1jFK+\np6jbgBNg3B4wKB1exHxyX0h/H1UtX/GyrnxxuJ0kxzJIwYrJSsaEWTmnbgB6\nXmYLUtu+sw4Uh2//FoIVpFPAPLlUI3XP7p9PJkQWUqa8yV+q3z3vIf7WxOTJ\nA2G+RLy3mEfRU96ELXnKh/zEcepxkZR0lha9PR2fKXx3wAXd3EZJN49hLmAh\nv1NmM5sdWgBSFmqqBTXsEbhWcA4Mx+q9QSU6BNgHjduF2Sdo7vsRwESP8nZr\n8HoumA2guF8PLL4S2hyuweUdh7PK92oi/33v0LESrNzF8g+EBp+wpBaU7iSu\nnX2QyvAkIme1TKqoi5aWaGhWNFrJce+1KelnAXbyJsO7iFxkGE78VehJCgi0\nbJSY2j6gX/XCQc3E2p4Jjpww+IMb9humBm2LgswPH0gBuFVttS6905IgyI6j\nRJO2TgDC8iGBZQ3+ubWWZMKxCgVA9lwjO3JmKoWgZGAitrmJYlV9rZf9bkVF\nLh/6BXBi6j6o5kRzIQtseMyu/myMeE1TEfaH5ANiNoqHut45mNn+g/ZEMd4h\ngXA6EXEusiF8z30RI8EvV0ieeo6XMIP+i72RiUnAj7sRsan4TUw8zZobC4HH\nrWoq\r\n=birz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJKF7xHrke3+fX8mqYKJRgapaY+PK+D1IrxT2DaLNo2AiEApeSVVEmqxlCJIIitRykz+mDbWVv3+PACysIYwLnBnEk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.8_1607016637913_0.7449879596802331"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.11":{"name":"ipfs-http-client","version":"48.1.3-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.11+f7a7a0bf","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.11+f7a7a0bf","ipfsd-ctl":"^7.1.1","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"f7a7a0bff2f87a03e554113a83c5e5aa728cba89","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.11","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-aM9sFh0fnnJdMqOy2F/EchagHH1v36lTJ/00FL4+VXarH/u+U2IXSE5WKbdel94Dtn9oy8GcTR+SoCLoz80DTw==","shasum":"0e47963c27fbd7dd34bb77511b66689e55baa588","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.11.tgz","fileCount":420,"unpackedSize":829189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0SdCRA9TVsSAnZWagAArs8P/1VSvd95RvJU4hkDknC7\nREQLkEUYCrOc/Vsy1iciAjdrVItqOyydht/7I8V8kUQFXHGFhKKo3ZtKw7Zw\n8i1FsOp9kHTgzS7kBdMlUwijcQuzZdD2rgmXhiQbDlLLlbEpL8ghJrfi0VqG\nmcneGtzuqX0bm2KWFTLixGT7dPpTcecFyImCnCVj2c1xH2hWHnhtQsP8sxM+\nZhoEXaHu5DhP6NLi0+Py2334wPXEHV1pqZkNQ46XapF3OiSUh294txIAAAIq\nURbb60JNN/i+XXX75XxajP5TShpali20aX7fwcN+dUpDITu4D51DpDSm6dUF\nUsNKqNN6OSokmFecR8gjjQVtDh8hx38m9ZVeeXOBI/3V3sN5M6bh8c8HT7bI\nkPCC623sI4fE9q4ROtWKdDSxNs8UW/z+CF+EeZlJ+BLWRzgPRKpex1cNuKpa\ngRPLT2XPBBV31VAgp2nnDFEryNxe4B5cQyNWx7GEo/yVLCEEU1ovSN10HOSQ\nQJyNmQeAW9vYhLRAQvmVrH0Q7d90osTMBygQ+AqIJS8TImFtSocVL9eW+cQM\nVyXClufpxsYmPMCU3nU8UDG9JbVJPTrzNQn2OIOytHRXXEANfUPqeZK4fNFe\nIGXYbR7CqzWHvHG8eqEukuUipEFU15JnKtvW5uBd1IIaXJRkvnb8vC4XWmxv\nPo1u\r\n=yf+K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpdUcmQvHYsgaVFn3368825o2HZc3JcbhJsl8rX3kA2gIhAMB65jvu4kSYL+fIfmjrs7LKeQvL4woaWul5KDdblH8D"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.11_1607156893008_0.3444782560076003"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3-rc.13":{"name":"ipfs-http-client","version":"48.1.3-rc.13","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"1.0.2","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4-rc.13+299a64cc","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"2.0.4","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1-rc.13+299a64cc","ipfsd-ctl":"^7.1.1","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"299a64ccbe4c4c28e4e3da3f70dac363e14c78ed","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.3-rc.13","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.22.1/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-jb9fhsQE7a0I/wTRuoFeyoJfDgjgtYf7meYN7A5gDxFeFhflzGySlXywm4fu9E7Gsz9f6n2sce1NYV2ksGKg6g==","shasum":"be3c40afcbb371004fff1f6a3602ffea8d4f3967","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3-rc.13.tgz","fileCount":420,"unpackedSize":831123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf13b/CRA9TVsSAnZWagAAX08P/0EoZJzePtayVpvdz5Qp\n292ZuFXEEOEeiFsN6LH32dCJNxYmFQQkUpplI/KCvWNGWgWhNMedx8v8lAKI\nsN/sbAxBQCKLqqGhEFiuO+63uQ0X1HonPbkKVXFZCZWSu5+1yyHe7rX1Yl+3\n9Odd1Svf5kV5V/YeEL/lWC8dmdpZT5V2IsrjcfQuql+HlYRDR5bJ1VY3y83a\nuMTwzhO7Y3+DMasVFHJOPR/bh88tQKvsQ6FQoO+UqQE82hkDO4Rgx2pOfWtp\nu1av3NMSTv1kAt44rmNSIiSBiV6wLLRjGchEXIfhA5Ik4oGuMyrXPmOOtXY8\nZIPzHZTCGbIP0a8IJuPihSZuE/bTLj7NnqS4iPFt1hA8/HpKn81j/HtsfydP\neW8ThjS+Yzx5rd508kbKvTV3zeeknZ/kxZACKuVx4DGZAsAh9HefSNu5OyBS\nqjGvO565ViLfE2AIC0PPuoNuArHE6t2d8WCy7QVnKmg1smWR8juXpExgM3Af\nrcdj5Akkajuu7HuuZhWqum21/5dPE/4MUS+q5Td9OOd1zXrlpMAs7Fy+Ux4/\nFBZmHxNQ7dRhIgeemCOxS4ieMR76xTzBcVyfMl8pINAs2Z9ZUaDTBUpzfhqR\n1KCeRekzpUzPhbc0h7E0loilZmKqqx7Pe5SS/rdnVjdw6RViAWNR1u1ytv9g\nOnaL\r\n=dIFX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3E7CN36WR1MMEXzEuZwUTyGt5/BSiAYUfuunLLlNttAiEAukPoIabCOEUPXZUsNDNpOAGE4QLVFi+jKTtLNbQNsOI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3-rc.13_1607956222717_0.26988253331844536"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.3":{"name":"ipfs-http-client","version":"48.1.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.4","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","go-ipfs":"^0.7.0","ipfs-core":"^0.3.1","ipfsd-ctl":"^7.1.1","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6b207d77cd66bc5326f260221e53914192807861","_id":"ipfs-http-client@48.1.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-+JV4cdMaTvYN3vd4r6+mcVxV3LkJXzc4kn2ToVbObpVpdqmG34ePf1KlvFF8A9gjcel84WpiP5xCEV/IrisPBA==","shasum":"d9b91b1f65d54730de92290d3be5a11ef124b400","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.3.tgz","fileCount":420,"unpackedSize":824546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2eEPCRA9TVsSAnZWagAA6SsP/0riArUK/4GtezYxZ9o2\nQENEWFVvCWUWMJJBMRWCy2Me15mckej9oWtZq9WQL0lY/pzsyuGiK3NFzN+V\n3V0oiH2EeP+4J9dbW2goAB84FURVCj2gJFZmH4fHMjGLkLVNK5qO8QHaDsTC\nxP/AB3POW3bkqZa7y6L5o88JEvfs2l1Q6h9UY8EaCIqg2rKVdo5dbHdbWz8L\np4ApJFOMj1F8OVKfGNffIOuLCt/ufePDjNqL34C4C+AijpkDgm6G+bsBeWMT\nAq/AKs+VwTLnRdrsauMLD1z+KGd6uRnehFiPViSInsRPjvVtfbcYIrnwwfWd\nHaJrFCZMlmKanU7U2BHe3YlTgUY1laNAicT7MaswJAo7m3WFW8f03UztiAI0\n8DvzGCgpTjJBsfr+CVHmjFIXrFkiqK/hbDdWR0i+dcMqjrQi50mnhUgvAzFW\n3TGBRANzB1w4+Am8LE5g8Y2fwqI0KNzVQTZQNne3byLznjBxB75owHPU7fHV\nKQWseV3y0GPmoUvFgJoABKrgPo6t1LochxUk64/dY/fePevewO+ri6/j8gz1\nyyensemkGu9fiM+t2I2EXiekRToO5K1Otq6YWW5i/q2dMrb7ybuyHgJHfK9v\npK52rNLpnww0Ev54aUVR/4I9uvB73usQ3qJeOYRSrYFAtI/jftQsYEFsc8nq\nSdqB\r\n=Q38E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZL7xlC7D+8vfzYCOr62wyuOE7IvMkLBezcl/lRcrA+AiAyo7CgJ6HMQqoBkOb0eEz0GeNJL3oRO+uiW7wfi7SC0g=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"mail@hugodias.me"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.3_1608114446605_0.3046063161591388"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.4-rc.1":{"name":"ipfs-http-client","version":"48.1.4-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-utils":"^0.5.5-rc.1+50147d77","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","go-ipfs":"^0.7.0","ipfs-core":"^0.3.2-rc.1+50147d77","ipfsd-ctl":"^7.1.1","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"50147d77a2d69918a9371edd7329c9561626e4e1","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.4-rc.1","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-/IYlRTKdRoiX43EQszhfFGookKqZeMOTNEAhBsR+imr6WD/L7YTHqjzpZ3XJnC4/1Fbf6ywcfIJHk41T2vPpiw==","shasum":"5b9a78862725f66014c3303f1be6d0647a964153","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.4-rc.1.tgz","fileCount":420,"unpackedSize":824370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3L/0CRA9TVsSAnZWagAAh50QAIjaexBi8Mj8AYcPARBw\nMw5YvG+/x4pSFeKeUKGI2B61mP31uj7Mwaj46csytOTfVpxgfsn1U86lES8O\nxEOaT8ffKVWImETriz4jzKkpMfD2fv9z98wv5jugKnYDQaTuUwrKAkagGWSi\ni9wowj97/rrDR5wx3hIxlM2f2T2Agxrj8R7ygiE+VVDUE8XFkGIBDJ2atzoc\n/2tZVf/la0RNsDfS/fUqKXlM8IF2QhXo8x9Yh/n5gsYCx1uIXWiTkMwK4vQr\n5SZEW1A2YvAZi0jTMoFrRmgx7/Z9XElatODb1bmq8Vfq07SXfXoInSwuS/8F\nlLsaCx0/eXWkuJksGLvTrDr55SeAvxAlMA5aqQWIumQilzszqNKlmb8aNfz8\n2ObJr/oS0KZUpNY3iO64FK878NpQFNowuFNwWHg775lGognZPkqT/iEaMLHT\nZ5R0xeB59XM5/hMsZJRkqBrMWsehHq+CNDMEts+/f/if0H/01r1w5DnzcGWd\nCcxgL17VkVBybtdruudIAPrkU/MgMJcEYduvhlkLLqiIqr7Uf0gm5A5aYi+A\ngnlsK9cf0bCBfr/zXKAW2/AsJv1MwmDK/bNh2QXc+16Xz05ucH2Trb4+RwY4\nUQ+SYOKmUpf1FPt43G5utVacl2nYAUAbwldFnrui1p6kgkhv6d7RdxTSAk9k\nnfVo\r\n=r/tc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICRQhKYrXYgBziLVpG23213LJ7lVPW81Iwy/skeQae7JAiEAhAlHW72JlfEFgDwYgy/xTrVZXL5uFZ4KPBLVYhRpEIk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.4-rc.1_1608302579801_0.8408383590411366"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.4-rc.4":{"name":"ipfs-http-client","version":"48.1.4-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js"},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.1.1-rc.5957+ae497111","ipfs-core-utils":"^0.5.5-rc.4+ae497111","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","go-ipfs":"^0.7.0","ipfs-core":"^0.3.2-rc.4+ae497111","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"ae4971113534c8f988aa14314e43a00fc3df854b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.4-rc.4","_nodeVersion":"14.15.3","_npmVersion":"lerna/3.22.1/node@v14.15.3+x64 (linux)","dist":{"integrity":"sha512-e1rAL29HT1YZkSczWkShZDwLaQxlbfaPnBr/omT6velmyAaddUVreuVThTC8XzUODgCcYXld2zridnLya2NElA==","shasum":"f8fc67175ae1e60115f7509d44e8304f7a211e07","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.4-rc.4.tgz","fileCount":420,"unpackedSize":820836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3OsVCRA9TVsSAnZWagAAu5MP+QHK/NtmZmg7Fr1jbhZ9\nStMvEsEuiz+jEIT5JnOSeWHSCxzVm7j3E9Rq3pb26ltg5zw8OPFhnWH1tTYb\nbuLG+plT+gIy1jTPv1L7bPtjKLtWgG8y3dSGJGUMbFHKTLdS+oDwq34cBx4G\nE+WBxKgOTL5AD+JadTqxfZxCnxH++8G/yU/DKql8FsWv0uuANxwzfzW7WMBq\nDt6BWoCv+nCBcNMMMm1xzAiL+B5t3hjSC/SarhDZFKA9mL12qnofOVr8wHQY\nE+sE+U7N0vkZClkFrURth/BusZX0F3HKmm7KJeKUvhr2mG65Z7rDH/tQkE3U\n+clL/12XrMtlikYrmJdnddQjtJfvfEksY3mmCHdFvm7Nh6dDcKiflIdHO5Tt\nclJ6lnyN32R99ZVtjCX4iyAgqyeMP80nmuxPrhlJbi0Bl6VcoahAOXhj4ozy\nxjX5i4ws5vBIU451/vpD+Er0Oq9e3XJbXrvjH2rheHnFMTa85w2HQhcWKYhB\n6bF4ow716nuHOVKoRffkluLMpu6OLzBO0xtgyKwYKPiBVCQTT3bOt9RvjxoZ\nFRS+YF2sWGrckPM7bS2Hs5ccf+CtiMDKUEzn48Q9HpryJWIMvksxDmNM5BcO\nyqbTm68aplFWPKZ5Mfv6IEAunPaS8zGpghkXXdAUurW6KHdU7H3H8ItbPyE3\nVzZj\r\n=IULs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAyyzOk8ia0NDMVDjbMYsLYhS6aR/6dDaQK2szvJP13AIgGh1T+h0rqO/heJ9wD7GgDSsBewgYHHTgKybXHU6WqYg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.4-rc.4_1608313620717_0.2761119825606113"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.4-rc.5":{"name":"ipfs-http-client","version":"48.1.4-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.0.0","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.1.1-rc.5958+fad9b740","ipfs-core-utils":"^0.5.5-rc.5+fad9b740","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","delay":"^4.4.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.2-rc.5+fad9b740","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fad9b7402e67a459e9967a1319870da165ba722a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `agent` - A node [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) used to configure connection persistence and reuse (only supported in node.js)\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.4-rc.5","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","dist":{"integrity":"sha512-J/YL29T2LafNMos+OLI0LF/dIHDNf2ZUNSbzslkHRx/Q4aLg7lRj+NbZLJejct9rd4SQQ3/b2Z9WpFcQJ/geDA==","shasum":"c455aa3f633ecb59290270356d1f3ec4da1e50cc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.4-rc.5.tgz","fileCount":420,"unpackedSize":822662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/ub1CRA9TVsSAnZWagAA8j4P/0b/ikJHNy+Yn4II7kjI\nCHPb6MB7bRG979dw/GEbPfTRORPKCnuRaigJfoomvTZyj4YhutPoPlKpk4+S\naQ26rEcvWQHHXIkpUH+Dr2pxw9KHrWfaql1iN+PZ0FIO3GzvjzYIS3Ulokfo\n14BnbcBzPaR5v7j/3N9a9g8GPUNsZdjK4AtrDmzghOGmC57nJa43VcucPK2l\nKjai7U8+BIgiPAbB5imCIgpwaUkhmwJV//O/AGb/MNv7hiHz4026GeAHOi4Y\ncDDgTOC6p/Y54Y2KeIcG+QSwknuyWVj+ggEjjt3xeIgzFz3kDC58GFkUVe54\n2DOFrRQzXgO0nQ1Ad3QTDgfzOASNSlKCRr0depRhZLTETSjeytjgckqoAyDt\nf3MVi70mcU1kIXpHkkxa00SaZlDocORpLNDKfMOlrBPMMiXoUhUdlyDPkIE/\nvHfsMWZmrUy/D+zcZQAJddWoOJo5E1rqo0uGoB13pbiRhBKMm3CQFRRHy/IC\nDvOdF5E6VC7eHUFDbESUPCiFED1wHRDkiMx3E8eEIOuZ8GRoSxGTk1PYyrVG\nsuTv6W8n3mBHLjCFpFb86rgadojN1o5jMV1eDyL0k4c453cyueC+exy/CheP\norQaRy7Gu0A4GGY/oLgv5JPj3djm8dFARdVeXGimK53OjIbkCjtWvzawKiU/\n8qio\r\n=huKm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGG6JcOwXCdy1NbW51xPEiIGHg+CJ9tXWq+etOvtgxs8AiBZ6O1qQ9NzRbuoCaqvBMPs2IZ3FH2Czm9EssLjii9Vzg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.4-rc.5_1610540789017_0.6856016740528175"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.1.4-rc.6":{"name":"ipfs-http-client","version":"48.1.4-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.1.1-rc.5959+b90a495b","ipfs-core-utils":"^0.5.5-rc.6+b90a495b","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","delay":"^4.4.0","go-ipfs":"^0.7.0","ipfs-core":"^0.3.2-rc.6+b90a495b","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b90a495bd07cc81ac7a9dcad75c5625b59dc3dd9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-1)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n* `agent` - A node [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) used to configure connection persistence and reuse (only supported in node.js)\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.1.4-rc.6","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","dist":{"integrity":"sha512-RBbGRqHWjVYZL0mteGE1CgxpKD+F2AfJGzyYBYH6S6U6WdR1FqPjYqm26cBTJBS8w0TYD/o03iasPL9b2CQuJQ==","shasum":"96ed150eac01a03d20e67e08662dcba031b7697f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.1.4-rc.6.tgz","fileCount":420,"unpackedSize":833751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAVeOCRA9TVsSAnZWagAASW8P/iShAhKd2/ykFQwSXrL4\nUWeWXYnVzeK45KB1uvtNdRsIoE1SohH319/9pN3u88QnDVrK6uCFdAD0BYki\nfZTAdq+R0fOO4JHH4vPMrCXNhYDZnrzaexj+RSn928nwuRaNUS/gn3sb9lJj\nKSYe2x1nVtqa0n2cYfx1+nERMlc+NNx1I43XKRIhLntmb5dVyCeB8Qn7gAqh\ntd4GkmWx5gPXu3Tq8hVSD12eEus8LX0Lb/1cBMp9E8dQbhgTdTwr8dZuvfv3\n6kQ1YGOXduFwXHAQ4neCIAYjfzgMtDuU0SL/aqKKm8mkEaBpcAu2VpypKiTs\nKe4sKW41jqQDi8VYpqXqFtoAkn3BoYSoz0r+a4yRX6f+MS9H7Asjprts6TV2\n6r68rZLrjtPTX5tY0vEZYoS3hGKusEI4zRWjfrKtdFkpbRL4pigW5dllRwCk\n3XPTf3vP9P0mJoXYgKRvi/74Eas+AIUmCBoKGRG6XJX0OYpj5E5z7SkkZy2W\n1tnMO28PhNQzsnEEdlB5MbDWzSZVgFibj60E/XpHFsbqGClUrGNfxh4AnvD6\n8k+7Wf9pGvNm4FJqSMK8bAA734keR6bc7l9rmxTG0deAEahzPHyXEQJYq1KF\nNsLADno2AiiJreHxtENjXx7mD6Dpt8XB8Bqv6zodIal5se0jLXa8wd8xk/sy\nlp58\r\n=RrWf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmMsxKlTV8Ve5VIg15q/baukLa/7kZFItBzeG1wCrMaAIgCzoe6PlZu+Q3ZpHon/QYRaeo09gn5blcrHFuUSn3wm8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.1.4-rc.6_1610700685879_0.4157928474344621"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.2.0":{"name":"ipfs-http-client","version":"48.2.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.2.0","ipfs-core-utils":"^0.6.0","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","delay":"^4.4.0","go-ipfs":"^0.7.0","ipfs-core":"^0.4.0","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"09f6f0cc98e2b8b2f1dacc69c9491555b507da28","_id":"ipfs-http-client@48.2.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-7t8Ju5LGUNP9AdSs3WzeKkcqKXhwPamQJO+YGLMplYXzlk3+L13nM5O/fi37kRBpWkGYAdNAMv4dNslQhzI1Mw==","shasum":"36bdde46cc41e4fa1f55fa216084b4b7c9ba745f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.2.0.tgz","fileCount":420,"unpackedSize":878261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAX/KCRA9TVsSAnZWagAAF20QAI8HAxCb+YssD1jQnca3\n5WJmZapCh3x5sR2ZXUrZf32xb2ymRAtEN3ydlQAhRK6y3ttyvhgA2ImyzGZc\n469gotOs9e+C9ew6sIJf6ui3eLwD07bXY11v/ReW/aLJbwIGgx4vj25+i9OP\neX+LE+uOzJ8ukHfxiqTPHLG792pg9nAEr7/GMN309uQIvbSBK4dEymJzGK4o\nbXF5oBtDqrH4XzCfL/qTZGDe7Lk/0T6KET/hUzcHPuftHsEIer1Yx6hMXRpF\n7jEzSkKl71B2NVR7CvEl2nX9Pf6JFKyb9LEW6+uaYOD0oViyPbMAD9oo6KQo\nWJIVT+Khk5cL73eGhdEbsQjex+J5WCpq8zOJWcrP1356tArFgh0ag71GLJxq\nrgm6qeQYkp4YZxJ5ERnAdR7liKW2J/uL+tpTqC7aDaYQrn3lgOgOeG3Dz/0v\nZLojE95f+lmlxjrdNnABjGxEECPlJ3v7dGgGEqT1AymY1b0JN1WkgU0dnNDH\n0Hgm2TzbLBJgj1hCd2FbweT57bEJB8NVODwf6DQHh61g6Xal/+EZpJ6GQZXi\nEw/WOibUJZCVegUyisvjwZVdBjYFdY5xggqurxkz/gWKEWFxQY+VpLJI+ilt\nQLMdY6YJnSqqalIOnXqOonao0Ldki0X9ucShLINHHBerUpFKAStNYQjB5zYJ\n0CCf\r\n=M4az\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwJVkA60+FAWVSGTsl2IC79w9ln4/LVlp07gAfC84O8AIhAMy/Zq1QEuUA9ifmfCtTA9kMj+kqER2W54LKqGX+73Gc"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.2.0_1610710985550_0.7898699043234021"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.2.1":{"name":"ipfs-http-client","version":"48.2.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.2.0","ipfs-core-utils":"^0.6.0","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","delay":"^4.4.0","go-ipfs":"^0.7.0","ipfs-core":"^0.4.1","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"43d5bb0318cb840814841084c038f77562ba0d98","_id":"ipfs-http-client@48.2.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-fK8bF0C+wX7POczu3fcrO0B3aaS35L8HxOUCi1V2yBPZ8+xeuGxV4YS6N8RgFev5Mxd7mklxEljy2RCigZRP6Q==","shasum":"9b0a098d673d8729071dd620c5050b234dfe903a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.2.1.tgz","fileCount":420,"unpackedSize":879950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB+CgCRA9TVsSAnZWagAADkkP+QGUrM2Yb5c7+gqJ5WEE\nQA+FIXFdqV4kXI6dLzx+xKfDkHRN/8CBmLKf8mpNLy62miW9SIE0TDm0ZUjD\nEJv757pYGpGvPZZD+fUvwWpd2ahU7/IGMfpcgz3lskMpi+9iKlW4cBixPLnn\nteWMd0mQvUUDqo9EF1irXJ+7+bEnRnunGRcccEU7js8HPwabkB3j7Nw8OqWt\n/cy8xVyW3j5H0EWxug42tAjN6BdiDzVgCJlThaq++TwgxYyWKQ+XqWbBdleM\nIF8lm74mCZ64FofmJnaDqbkfLSlew+RyFLAUR3ssfW5g6kcg74H+8mlzqhHi\nu8bKhMYVJIWEGorQF6KI60d0dX5IcNKS6vAbv6i0PrHI2wtaViaBxEpV9Dqk\n0vcpWZs4AMKyG89+0BpiSBN1HJSqjHjx6yiLquOTtCctWFhLxD8BgkfIx444\nmtDbzFyIPmZo1fDhar82oocVMtwIK/riz1wI8yXS1T7p6stBGvlmpBpG7bCx\n9gx/eFHuh2kT1dJoceV4akfe0PTPzbhFRd5d2iaTxMu8ucq8wNQGNI0MVedd\nn1WfBcgwRz/jWmL8lOUw/UkHDKUAbJwV8OusPKgmQbJYEP6QqiFHA9wBlSWy\nbCOQLS1Mn/2Y+oeOS3PUzVQLCCMj4tVQMFrdCL8Pw1kM47IfC8HI38ve8RSG\n3URq\r\n=wSG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3BEl/VlMNsYBcdIU5Y2y/FlisGzaNovEjm9T4WvgDbgIhAKRT/ehejumONHC35qayi+i9ZlEgpF7y3/iqdMY4aAgH"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.2.1_1611128991781_0.5476439673641071"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.2.2":{"name":"ipfs-http-client","version":"48.2.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.2.1","ipfs-core-utils":"^0.6.1","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","delay":"^4.4.0","go-ipfs":"^0.7.0","ipfs-core":"^0.4.2","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"2f526025a3603026553b320e050e57e2ee564562","_id":"ipfs-http-client@48.2.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-f3ppfWe913SJLvunm0UgqdA1dxVZSGQJPaEVJtqgjxPa5x0fPDiBDdo60g2MgkW1W6bhF9RGlxvHHIE9sv/tdg==","shasum":"b570fb99866f94df1c394a6101a2eb750ff46599","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.2.2.tgz","fileCount":420,"unpackedSize":880509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCr9XCRA9TVsSAnZWagAAT74QAI9O/Hchbt0S7ZbNkp7d\nm4JE55HsYh7XESBnu3+NL+v1HfQw0oulsh1XQP7UBYQLi8LAuX1yBeJjUGK5\nIRh8g9HJbnqD8wpo5wFn8M7jFtKntz74pFbFv4Y7DKzW7Rbme19WEL7zZeME\nFD1yJV+MXXIwMzHW/J+TG7QKy3qFGYjqairN1wJdklE/07xqxLLnXvPxnL8V\nD6+hu664wTySi7x6Q1TLWxoWObn6nThkr4u5nntPx5L+m3B02ESkvzX5Uo8P\nLJ4MummI9Dz4ezJJzUfbVwpGvH3FMpXF2oaXvjaY/0rTrqLLsemtOcDA5U3Y\nNvJUfjTDgwW+oOVNczgCJUvu7qziUXtf4xuVf6hE+HNiidpqJcl5Yw4DFEb1\nX+CqvAp3Hb0NQbO/dkueVsqGj4XDApBVSusP+7AbDtyQJN00/Bq8WYYkfZT2\no8/2zCFwwiqfEbmLIouKDnzz6a4hjPKgEJDxYPJCu0Mj4u3VmiU1xfDrXN4O\njraB1AYdNSfCoXBgMuM8bYKhfYZUW9oq1pY6Vj4jzp/6me8Z7n7psFlu1Inl\nPwuvLz+AVt4MUMhgMq8dk9FgIkrD7YzSahYFSte5qeUFRzEM3HRLIuLyV31G\nkYIbhL6s6tO3zjSCeUlvcHz79iuiOdfmbXZw501fB8v82wX4JwN0diGi78L6\nHhRS\r\n=zvo9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgwO4RTvPmEe5EyBCk7POzIwTDs2FG0mZb6w2ezLQpGAIhAK+9WFwdwnPPnRDXoW5YsyNo8iR20JkfmpQeCb4Etay9"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.2.2_1611317078569_0.48174936804785995"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"48.2.3-rc.3":{"name":"ipfs-http-client","version":"48.2.3-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"test":"aegir test","test:node":"aegir test -t node","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":"npm run build:js && npm run build:types","build:js":"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 typescript -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.2.2-rc.3+6ae31055","ipfs-core-utils":"^0.6.2-rc.3+6ae31055","ipfs-utils":"^5.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^2.0.0","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^1.1.0"},"devDependencies":{"aegir":"^29.2.2","delay":"^4.4.0","go-ipfs":"^0.7.0","ipfs-core":"^0.4.3-rc.3+6ae31055","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","nock":"^13.0.2","rimraf":"^3.0.2","typescript":"4.0.x"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6ae31055d21fbb0243bbb17cc697ebe18d84acff","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`ipfsHttpClient([options])`](#ipfshttpclientoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `ipfsHttpClient([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst createClient = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = createClient()\n\n// connect to a different API\nconst client = createClient('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = createClient(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@48.2.3-rc.3","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","dist":{"integrity":"sha512-ncZwJlMYDVwsqmsoTvCXjyDMCf+A6fW5sKXI/YdDcoPretL00TlqsHzJiIbLZ6gjWFKhZ4pnldn47E79yH6LSw==","shasum":"cf95f4552ad653d959aef4c9f922bc3c1aa2613a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.2.3-rc.3.tgz","fileCount":420,"unpackedSize":879918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFRQrCRA9TVsSAnZWagAAnyYQAIa+BY3oryA5Xlor/ijS\nHQGamQ5C+y4SjV5RdS+z+obV5i5bqAWASjtHDOFgBf6NH1pjN0YhDDEbtvCQ\n40BMzAzb1FORCVGWv+jkV08nah2TF/7DYCHYOMzBALoRVJ6RVy/mewXW9RDU\nXk7Q+xc7kYjhxmW2DwT71bK1TSZWNGwpp9tByDpomzdwy1sntq8wnHnN/Q+W\n96MXhZfsHT879tHBRbz8jq4kbnxg3+c/FNWWsdPc9BEJ5kMS2CrqY3OAcZRr\nqd8CimOa9EveeT2tUhg+g3J+IcQH5oDnTI9NP7hQoTFBadjm9KtO6Qwrhgrm\nDS+pa9s0Vfh0dOkVlO5HFGI/kMqwlQD8zGb/6MtBShQoKvrpigNEYJBzS8W9\nrXgF9xRSjVMuEmPOj5+Qa8YMluNmzXv8tkEhy+AKX8vPuSKUYR4ka/6q175d\nVfsIzVqpGKM7EQwsRh2CxiSOThM4k7AA6W8LrEywA5CkypAR0hUPpXGAcvaw\nPwT+439XjTwcCTMaQXgh1xiUkGAR7NxhTdrKY71lLMRnaFN689R9fJKNcAta\naSf+YZ5jicn6TY1rKMT/qMZQigNgEv7z5Q3RHJlMZcKHLo9YIqff/wMlOLoY\nrQfzviEsycRrfE/KZFJoWabmF/8eRbIbPa0rSF16cM7dq1cwo8d42qSFWXwc\n5aEY\r\n=2cyz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChX9/o6s29r5THFim8XYnB0VWp1ta1VyqN0uCQVslVewIhAJ+IeSWk5vhNeO8LLsnHXwA3y70MoX2qEXOzteM4VwOW"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_48.2.3-rc.3_1611994154787_0.9694431661076888"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.0":{"name":"ipfs-http-client","version":"49.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","prepare":"aegir build --no-bundle","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.0","ipfs-core-utils":"^0.7.0","ipfs-utils":"^6.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.0.5"},"devDependencies":{"aegir":"^30.3.0","delay":"^4.4.0","go-ipfs":"0.8.0-rc2","ipfs-core":"^0.5.0","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"91df29245562d5e9ff653e09b54cd2390538e64a","_id":"ipfs-http-client@49.0.0","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-2XkJIopI+C7H4nG1fjOFoyqFJBynpY39AmhqVtqf0ZOOqwKWJu1isq8eVieQ0Zghmkout0iyMPXL+xqBzvQIWw==","shasum":"fe0383e57906442d4710c5cc0a885b7397224d56","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.0.tgz","fileCount":423,"unpackedSize":335560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF+fWCRA9TVsSAnZWagAAc8kP/RN6x+SVmplLTFfRAfic\nq21JC44Tq/9L/0LACOCVWjoeFFIxMRq8asZa0ARHRgGpndNzzUvdmFgrBp6K\nZWLpi5teLAxcaoz0wA5QnYR14ztLjGadT8zathV6lGHzXSYfM0bZkzNnmJWy\n2lD64li8rQZtzJOG9A/iGy4wOhcOAOdQuZOljdOiN7LDf3rOiFWON2iZiP1z\nApgv4h1b1ZRLAVT9yyrk05JZeDTGG7OSj+doLDg0qzcz2xbDgB7Q+rpuBdVL\n+kZYVaX6NbJEn3SmQ+l6LJnzePQAlv5uK4deYO1Gpwh9JwloybEbdSBJs2Mz\ngu7Ryx3jKvWFh/jsCgJBd4pzlq9sdjZ3REwjUkUdf+80ciPh7FTsyfSnpWXw\n4+odEa6DFvAFdGVSgwCJL0WQSQ/W6MO7kQtQu7q4q6kdm/XESjghMjC26MQp\ntKV+OjCfh5EDFCEStH+tZtkWckeCA0MZxP+qzDaIlHZ+s6j7ZQiQNYO4D19H\nGTDMirUmwdQcR8/aGE174+jOf67k+Yq9cLyFFtCbODenXqyIGxGZC02xPIEl\nRQ3iQtHeVrgItG6oofnMqkhIWYkm6JhmO6WGaOMAOoxz319wsvyUuPHNFnyR\ng7kVxUh2IQ3OCsvJhLr0M7SSW0VODE1bvK4FUg/0vIgAuotXJRmzGTCBHeqF\niaMl\r\n=K8U7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD63ceQTS8FulAhfyDUHzIJm5HQdTNIG9DZ7ppPDONohwIgRKDT6xxbG3QzoVwCB7GbSkbBief7XieOSg5DQ/kcdho="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.0_1612179414135_0.9000968486511856"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.1":{"name":"ipfs-http-client","version":"49.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"prepublishOnly":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","prepare":"aegir build --no-bundle","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"any-signal":"^2.0.0","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.0","ipfs-core-utils":"^0.7.0","ipfs-utils":"^6.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"~0.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.0.5"},"devDependencies":{"aegir":"^30.3.0","delay":"^4.4.0","go-ipfs":"0.8.0-rc2","ipfs-core":"^0.5.1","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"10fc290deca311263a4db95ec6b9e9ce132d6eb7","_id":"ipfs-http-client@49.0.1","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-CDfed7Vbkomgzp5t0oFm6uKe6bjjgW10LgUzmpby2Ai3O1Zryhwbj3RQpYQQGKqub+fG76jEtpteVNZ8HBc9Mg==","shasum":"26d8e4100348795a6c79213b0a0a88a092664712","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.1.tgz","fileCount":425,"unpackedSize":615626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGRYsCRA9TVsSAnZWagAAyp8QAIxLrX8qaZndu1BouK0T\nAG9dXA0UV3EGwMShP6P8kw0vFBjjXlSsMO/RWHmWy52KroIlEI8wu/xqfaRu\nr8feaSnezEM8UrEsvEGjcf7sT+GTGczPqfZu7JVKa0DXetDN6z/CO+7M90WT\nlpdEY4KGIhx2p17JwpihJ0845QPQP6EqLt0+TrPE0bMteD4oMh6OIvEEYFIV\nbIZ/xPAMf3hwKj/rV3ZDFf9x5wwvos1aULVnOT8DDpC2PADoHpg0PdaLYNgA\nnm/bzmBKgAy1SDiyYU7/ExKMjViNcdYFsyuZXvZZIUjIF75+f4WlTU2wJ/If\ngoCoEuM78x0Sk5F4m696xJFkHwPzkIpGURXwxbdIEq1gdpEhQqWVKVnNLiUy\nRFDxnOZQ9p0oDyX+j8wpCk3j6WJnUKkywMOLx/0zvHHfM0fLc2W7EB333/xq\nffigD7MAyh6fMQ54dc/hBkBzBaYdIA3iw+R8ShFiw2ofSS3zlyCnafhhKpUc\nG35QIPMqYRld3KovuLWLZVz6KxCVK4qerZ8jLKs+F8qxJfWskpcwTn0NKswI\nqymvserC1PwXHa/l0f1vSHZC/31k7bag2g3AxPJTM6Vja+TqjkjKKY+cfsJL\nE59h2H4nUxQZidgLCALAjZM3R33qhcgJm7q4P7rHyn1dxzuIpK2P/lvl9t9n\nhUJy\r\n=saVW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDF7Qocekn03feL2JAIU+f3DJ9byP7n5Z8wFcNZZzsJXAIgAn0myQQyoR4JzKLv6CVLY/1TCORpePXwMwaOSbgZwyA="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.1_1612256811635_0.690471893151815"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.2":{"name":"ipfs-http-client","version":"49.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"prepublishOnly":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","prepare":"aegir build --no-bundle","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.0","ipfs-core-utils":"^0.7.1","ipfs-utils":"^6.0.1","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.0.5"},"devDependencies":{"aegir":"^30.3.0","delay":"^4.4.0","go-ipfs":"0.8.0-rc2","ipfs-core":"^0.5.2","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"ff76e7cda441d66d327e03e3ca1dea6e901ec918","_id":"ipfs-http-client@49.0.2","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-Q7OOFO2laqL2hZCDGVSF+ObQ/xptO6L/qbe0WkXfM1OZypw2Bah1BbChPTjmDTrXeicNYgua85EbQqtv1C/WSw==","shasum":"b74c2fd24f2395a40a9eaf4b8e5906157605eb9d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.2.tgz","fileCount":428,"unpackedSize":616865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIVoKCRA9TVsSAnZWagAAviQP/0cCW3mgKlY843vbc96A\nMV/2QZHYh7mX4pyl3B0Y0F3mDq+cuGxNgWB32eD9PPl2K2mmQP/KT5bdnr9k\nd2w6PzHBrQnq59TJp+9FZ1ELuKnWbY64DMG5m78giiOY0M+h1WSITDMqmXR/\ngVIZ9/+m524rFE4DI35UnY6oBRpaIEPnQ19tWRcOAf/aO4ZOOxBmzA5qB/Tj\n6NUiQm4n8mSNZCwhIjFJIus8v5txBNZQNc5nmAI/lU8eE4S68T7GlV38skkJ\nIZWFagwy8mv74hEe0gK1iDK8YlYy9s1f00RNmVTC4loxZG+5/P1bzXQ755n2\nmQc4ehY9kkAiX4s6tUx8XvHMiDquZFUkKyh/tAL9iNHrVmnExv7nV0WfYm5C\nUJyEiliJuBU+nywkG9kfhF/CXnDXRgDAJHX7nHlEU2KUuVdfs7ffVosIQw+Q\nhfkayLT50UMe6AbTJuwpnOkpGL2/d9tNgb2RelD1mGACZKVk4zsa3wKxqIZF\nM0uZ5DEuehTi8/SzOc2noIVcG4QNMroDyoYld4oH051SIyi8FlqyMfERrB8f\ntRSfGl9yy5o/Rv+6JPVjXW/ZGDkuZw+6bzuV8UB5U2S022lemZK1pK1Y7PJz\nQeTGpDDvJg5rKwh8Pr3f0uPpFUQRZ3aJHbPfSB+Lc7kgIJnT8WxzsUh9AjIe\nzueD\r\n=4uUu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkchWjPS0IZagDdrj45niPfFQp0vyrNynpVoqPN7tKpQIhAN8359EnOUJ/W5ipOkQf2IJUVYjUjRISxd4yZwPZTrU+"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.2_1612798473701_0.9968196919729522"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.3-rc.4":{"name":"ipfs-http-client","version":"49.0.3-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"prepublishOnly":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","prepare":"aegir build --no-bundle","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.1-rc.13+be0c613c","ipfs-core-utils":"^0.7.2-rc.4+be0c613c","ipfs-utils":"^6.0.1","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.0.5"},"devDependencies":{"aegir":"^30.3.0","delay":"^4.4.0","go-ipfs":"0.8.0-rc2","ipfs-core":"^0.5.3-rc.4+be0c613c","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"be0c613c0e413077bfccfde0345b1ff2471193c1","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`ipfsHttpClient([options])`](#ipfshttpclientoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `ipfsHttpClient([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst createClient = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = createClient()\n\n// connect to a different API\nconst client = createClient('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = createClient(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.3-rc.4","_nodeVersion":"14.15.5","_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","dist":{"integrity":"sha512-NH54XEGVYUaNdQJsuHSF6nQhcd/hbWRiiXFWSrydUzmXw5C80BWVEGWiDChMaac8nyyt0CWfFeT5doDefzwFUw==","shasum":"747be21914160a755c7a870ec3402b6617b9f280","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.3-rc.4.tgz","fileCount":428,"unpackedSize":617007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMiTnCRA9TVsSAnZWagAAxA4P/iSn48uy03vHWrZfAZbZ\n8phT/ywiEgNSDGCFI4XAzYW4SZmUUe3/ocwBt/irWBSiKS38Z6o/72i51gMZ\nBXGdcw3i7wkegfRJ+PDLAfGKZBzFqa0Vgb162J+4ZnUETBg3553sqtop3/xX\n4K1KCHoOxqogwn9htWOL12Uz1bG4VtCnGpVCiVNCaU4/F3glQQaEQ+fjAx1Z\nBTANrLUmIFDkUf9KFYeR6UyHh+KyXtT+D1FsikxeTy58BHd54xTkS/oIKdgn\n6Qy3oeVmjI1OW/GwMkY8MF8Q4Vi52rea4YgbaYwIYVHifEKWQCOESKvW/sfq\naVo+E8MxHa1vHlmFsbFITO+eUOgpUSltmjf2l+gx6INSj1c5WlxxvZ/xvMJ7\n9HJgFNaBMfSL1R4bZkSpPkL1IhO8I1KRMwcMhfFWUGo9vDf74vM1npSi2S0S\nXRrojIuZSh/MQXI1jJDwWrJTopa1hD6UDNXzX41Ph63pKwe2iKvdq1E/gkDf\nX8dxLQe3Fwt62++jyXETo6DzkahcUL3CVOZE9R6zbX1u97miZamr9Fp0NuKz\nYizfvBwemX0hikUG4b30aOEobMVacs6tYlE99iR4LC5wusImMrTP45932XFl\nz8YhlsTF9c1V5SJCsFTN9wdLj5uYWuf4y19V6ZWFU3C775mPgevwV1pBE2+V\n6XFu\r\n=Qety\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+t9oGx4RnPBGMVO36moPYWWmP6U3duov6q/kqzIyK3AIgOiPtqHPywisnzYmyp0qLLtglDqgMFTAECIQQJI25Dhs="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.3-rc.4_1613898982953_0.13687362943497572"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.3-rc.5":{"name":"ipfs-http-client","version":"49.0.3-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"typesVersions":{"*":{"*":["dist/*","dist/*/index"]}},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"prepublishOnly":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","prepare":"aegir build --no-bundle","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","bignumber.js":"^9.0.0","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.1-rc.14+b7659d45","ipfs-core-utils":"^0.7.2-rc.5+b7659d45","ipfs-utils":"^6.0.1","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^3.0.0","multicodec":"^2.0.1","multihashes":"^3.0.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.0.5"},"devDependencies":{"aegir":"^30.3.0","delay":"^4.4.0","go-ipfs":"0.8.0-rc2","ipfs-core":"^0.5.3-rc.5+b7659d45","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b7659d4544fbf335eb5dcd3b71fc1b81f436088c","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`ipfsHttpClient([options])`](#ipfshttpclientoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `ipfsHttpClient([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst createClient = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = createClient()\n\n// connect to a different API\nconst client = createClient('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = createClient(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { globSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst IpfsHttpClient = require('ipfs-http-client')\nconst { urlSource } = IpfsHttpClient\nconst ipfs = IpfsHttpClient()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst ipfsClient = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = ipfsClient('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = ipfsClient({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = ipfsClient({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = ipfsClient({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = ipfsClient({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.3-rc.5","_nodeVersion":"14.15.5","_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","dist":{"integrity":"sha512-QrmnU7fsg5YxkWyHnkyBuvHw/erwp6o7VY6gXeGLdxjDtc2PeUxMPtjYO/Y20QMQbDzQQBGZAAHlbBaz/n++Bw==","shasum":"b8e366401110dc3c75e4d815f1582b085e1d426e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.3-rc.5.tgz","fileCount":428,"unpackedSize":617012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM97cCRA9TVsSAnZWagAAkeQP+wb+etp3QEB0AzAWuxPo\nIkCeaGVLE0tne4D+Maz8/bVcN+Apoo7eII/opfJnzpdxl3Mj0NJ5ZSVIPUpw\n/1kYiYYNn4QN0bJdintIvX+/N5/MAuKAOLpc2wqjPqMj8WaKUSTusiTZmv7S\n9jWz+jEePkVxcbLIeZpnMLbklumVC9c/e3iP0JGOR2gKy2O+J71j7o9h0hyY\nfaRFI2ftb/Pth9rtZqFpPXW4vXmtouInSKPwHa05HU5AL56YaSVeFfhuDZ66\nbN0dYAyTiexv5xOl1eaEwq3jo2GDdVwgEnlvqG4j62crKdVPT6K38UOvQ10E\nDIcHe54XjK051mOagnjjC+GJKfsDh2aEs92FSAvx8821IIxrG5wSolmEjHLw\n/6bjfYD6U+tpKSLF9i8V4m9JccCAaguYBRNNLJIbVhX1Sd7g6vlO1NTMfAw+\nuywYXKwV++1tlabfrwoqZBcld8Lh+6S2htXvbTok2R8ISc8/9rahbf87BoMV\neuRwMEyUYzjyHhgnclouqPKAUUOBK8OscksZcg0FR9OI1LyNgOMqpZX23Pxv\nblkapKtR+HRx6kNSrwUYukOLbWgCfRowUqlMQUw8lVQL6aWeIVFqRc4Z6tRo\nnWQFTTmNnTI//gZPyqNJFJ3CsLhfRuesGITzGxqwY+cRAcIeckGX/dv97vBx\nwRi2\r\n=iSY5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUniQem0cSCMYdjNfL5eRAG6Ei+dAFTbumAx6t5UIO4AIhAJ+bLkOHaQqgMZCcq4UYad2h1i1p8aYxDudnnBBayCgh"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.3-rc.5_1614012123395_0.8947818064340649"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.3":{"name":"ipfs-http-client","version":"49.0.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":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:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","bignumber.js":"^9.0.1","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.1","ipfs-core-utils":"^0.7.2","ipfs-utils":"^6.0.1","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^31.0.0","delay":"^4.4.0","go-ipfs":"0.8.0","ipfs-core":"^0.5.3","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0af3b76115fce61d64f0f8be90cf13263d2a12fc","_id":"ipfs-http-client@49.0.3","_nodeVersion":"15.11.0","_npmVersion":"lerna/3.22.1/node@v15.11.0+x64 (darwin)","dist":{"integrity":"sha512-cosOuN3KaMeOMEHi+g54UNF0fOJR3lyFOLOH4tAMkm/OTQa74i/SfFbfBtAIwC7nFymFs9iQAV0nXStVelrpdA==","shasum":"3a33b9e7bb54a4c03b523ebc636104989b954a84","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.3.tgz","fileCount":426,"unpackedSize":337209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR1JQCRA9TVsSAnZWagAAb2AP/AxnHAR/pNLRMSq9r3Qu\nqNU3tyaWisceKUkc0Vn+jdcB6ygIl18IFfGmAvo9lYM5L85hz08Px2jX2+Gw\neAuOfJ+NrWo2FXc9KQ4JymRtYM8Dgsn3zShE5QWKp+9Oem0fdEcNfYkLfMBW\nlW5Gx1ZEzwC5YmSuSSksfzygCPS7K71a9bdV8fA+cYdETgJf0HtDF40i95GE\naz3nc6LOHwRwTy8bF8+noBnuvdQN8D4hbZqzhihRKOIcbGK6UOQMYGM7I3Ya\nGIkh5Y7ZlPGmitplQioWJRK2Oj1uzhvcmx/+0jw1V6A9Ai1zqomrP9lkwU3Q\nJgv4HnKm6yufGUffXdXF35xd9rfruK5Qi/z/xEdOD4CiicWIKScEgmPor52u\nZVayeh9sQvuX/lyO1AD/bLqGonk8HkTQPCLVziaPi8CJ5C9vRyu62WZtGkRm\nRfkKZ1Nb00Zwxix+I+zytRvKiEbbGTQhPtBrvvnavlYSyM9XTBxIS/bzS4yB\nI/8fXVp3maNdB954PyuTcEt1Vvx8ijmdRFZPx6i/5M5TP7L382mgszXkNPZB\nPT1kbjL3fx8fe66zLFknr+5AwwCaweCuP8VEmD7fRvHXMLWaBtYK2qNnLmh1\nmtr+5Jm7we4DFI4Al3fHIMsDn4qQi0XtuL+SsHqEmiQIUExe4C8qvy9/DXkI\n/yZf\r\n=Vt3z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTY+pHoVQqYVqJXcBr02LSrc3K4RVZoy7WQHVrGCjoVAiB8D5YYqCuh3qUCHOg72ElFXSEZLDNVSC38/lEttrtfjw=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.3_1615286863638_0.7726965952479339"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.4":{"name":"ipfs-http-client","version":"49.0.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":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:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","bignumber.js":"^9.0.1","cids":"^1.1.5","debug":"^4.1.1","form-data":"^3.0.0","ipfs-core-types":"^0.3.1","ipfs-core-utils":"^0.7.2","ipfs-utils":"^6.0.1","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.17.0","ipld-dag-pb":"^0.20.0","ipld-raw":"^6.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^31.0.0","delay":"^4.4.0","go-ipfs":"0.8.0","ipfs-core":"^0.5.4","ipfsd-ctl":"^7.2.0","it-all":"^1.0.4","it-concat":"^1.0.1","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"511147bedd51be3151de44a90fefe9425bfbcd50","_id":"ipfs-http-client@49.0.4","_nodeVersion":"14.15.4","_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (darwin)","dist":{"integrity":"sha512-qgWbkcB4glQrUkE2tZR+GVXyrO6aJyspWBjyct/6TzrhCHx7evjz+kUTK+wNm4S9zccUePEml5VNZUmUhoQtbA==","shasum":"a7b5a696ab755ce1e822240e1774caab6cffa117","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.4.tgz","fileCount":427,"unpackedSize":699720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSKnVCRA9TVsSAnZWagAACxEP/3x7JrkGlqi8/uPgWZPt\ntaTrfsDGYKydAHM/beUMpO0CdJcExhkEus4BcaO3KwwXYWfAlyxp6XV9XeJM\n2aKm/iC/Xp7umLdx7goaXJkVvYygolJzX4JsNX4pi6/esIog7FInxB023k6T\nGyo/Asd8oWF9M3ANWvZFz0HJMu0aqSXP4Kdqrb7/Qaze9VM3jm1/7X5k4w8I\n5dV4OPb42p9TvQll0muaYZxxXCP5Sqh4jJCKUsQ/HUYLAXDKnExAk7Ad+jge\nwUC2Y4JrAv6ZaM8C06Z97H6bAOADCK/s94ISCJ1Rjj27P3BqrupKmjfQHzIR\nvRJIiu1ZKBgNK4NtE8/g6vrwMHKR+uWiJVIBHHOfVdGalIWOxuX1McQWhw3X\nHQssM1VURsfvSfmePPImyObgAw+hls7MJvMpmfHfHr6Ns1/HBXEhsNcEYgM2\n+eFoQmMcveT0BpgHd4OcmwFlcki7Fc1QcMdqJKMNNsBYpxhfX8bBi4OaI4mZ\nWdXr4omrl79LZ2NrxNZev8nXFdLgAAO6o87r6oBzd/JkyEn4MfxSZNn2x1s5\nEpftAcxZYM8OtQgsVT8eriLYKsPDy8wLB5tfqTOP/txvGBzOy9XZXuN4LyV9\n7q9EYqZH9WbNc5PdWvzcgu6FZXtKY+t/sene8MO58ornYMy+UWEN78tzzUtP\n0ITp\r\n=Ympb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfDbOuj+CWKk+DRkQKi4EaLL1QPa5dfTp5ihxnvAHHFAiBmaQJoWbulB0IHeROdBX6vtUBkHBBJMskfjWRxEfmRag=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.4_1615374804598_0.48190422874611993"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.3":{"name":"ipfs-http-client","version":"49.0.5-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.5","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.6+1823375a","ipfs-core-utils":"^0.7.3-rc.6+1823375a","ipfs-unixfs":"^4.0.1","ipfs-utils":"^6.0.4","ipld-block":"^0.11.0","ipld-dag-cbor":"^0.18.0","ipld-dag-pb":"^0.22.0","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^1.2.2","it-to-stream":"^0.1.2","merge-options":"^3.0.4","multiaddr":"^8.0.0","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^0.4.4","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^32.1.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.0","it-all":"^1.0.4","it-concat":"^1.0.3","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=10.3.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1823375a17ee2562f06accdd605eeefebf7a3922","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.3","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","dist":{"integrity":"sha512-a970IzwoBs46cpUMKzLv4mN5bXbcuN1rVmi9MVbjrHKrjn98vsax+bKtqZSyrzO0Tv+IaL/erTr3Crk6cQuVMA==","shasum":"c51c183e7a353a55dd5c962df07964d66bc9295e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.3.tgz","fileCount":435,"unpackedSize":719998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJJHCRA9TVsSAnZWagAA8toP/jbX1jXvPUw0IcXbkwKx\nDc8La4gl2l/dVWZ3C4y1ZW3JZbCy2SsWKoK7Pe7IxGjnE8t97D2GCZgbQb4M\n6gV10FVwhXoRTm8qyeFbhqcRTvCW/P92m8gsyn5jFrtksfac1AsqsmziEsBf\n3wilOT0QVAO7GMoNGuBB53ZLT0cS9fOwBrRRzw5NqaPU10CE27SGikN6PW1M\nT+tIGOZbl8ixVyZJMwZayRv+IYARIiKk+vunQ0Wjt8lebJqSpNY833w434Rt\ndXghBekWI8YAT6MPw4RqiXT1gvtcA0NG5F7S1RcmaU/nunp1jHB+no/zjcNS\npwE4xaxcVXMKigPiNoizYKjFmwGch2LRPLjFRhjfHHJ/45z3KXj/ft+pcOU5\nl5QA99T3vhvcfm2Ka6N94vvZ0Y2G/iqvLcWJ97KsPhU9WgrK4+Z+YWUhg6Hv\nWEJjg/UVqQxOjL2+ZJGfes5psWp9vgTULEGQuhlhjsncD+lhJ65dERH6kXqS\nFvs6tiJ+VAVobv0LcLYfqqNKaLvuGbbn6ISwjeKDLmGI143vYe5VcrM9sket\n5/WarcIBDVa2tVU5u4jFeHilZqD6qvOmDoBuhnTJejjW6PlPhjjmJUJpg6fm\nFYFM4AKGIMwnxUgDC/Z+zSw/ksFBn5jvQ2gM7D0weAZAFS/DkGHoKjhrOfm+\nr1sM\r\n=ghOQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICanX02/FdmeEseujoHnt9gNGjDbU9CtQ5jnOqWSAI5YAiB3cnG2u9vJTb8+g3yinNnRgc8mI2+23l3NCJpHrg6Xpg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.3_1617203782639_0.355954523501411"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.11":{"name":"ipfs-http-client","version":"49.0.5-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.14+e7de593c","ipfs-core-utils":"^0.7.3-rc.14+e7de593c","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld":"^0.30.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"e7de593c9fb74bbb82731c9ed41ec5204b18b1f4","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.11","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-PIXuHhbDrTSx9PO67GWsRpHsHxrSRKYmXssj0XyOh4+s3h5za/TrrXoBBf++XSeO1R6fYAWON1i9fao2h+dF1Q==","shasum":"c1fb4f5a15afffe8f05bff2761faac0520a528d2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.11.tgz","fileCount":435,"unpackedSize":661273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiVIcCRA9TVsSAnZWagAAsaoP/iWprzXxCuCgXuIy88Qd\nUlObyJUDL4d2c10m0HQ7Qi/hpNxSH0py+vrdWbCqZwaWaNpauBC3OaBSfOZf\nPSxMrGBIfD6il99X5KeXnLm74Fg9C7kdBNo5BPY3+/UGHL5I8bfgYOb6PWDI\nSy4ibJq9aDnnqc7by4Mt++Nd8DZDIHLdkwWk8wYyjoCnDmnPSbnHxV0VIrBn\njsGsAJHf8hzkzN017yLeQiH40Qp/5P8RohBkVUwoASlBfrury0JknkOb7mSS\ncxJPZD5OZ9FxqpQt55EOXjDbLbTMcwXguVRM4o44JSInXJbg89Xk5Te5vtYp\ngpJXE3o2BoXLGzMCeeOLN4DDH8S9dYVwal8BMlASqv3z65xOHATFbuVfxdX4\nceVTzqcihscpUvGDKQAk1X/NSE4BOyvg0Lu4fhiNGncmVGQ9GWxL3RrvMCF0\n7teWevENH9OsKPTL64L4BCacRNWTlWTCF56fRrxczejSWh+M2FDMf8UVVA4i\nK2XXwrMoXuYjbFzAUDXzuCLKG1hayL+2c/8fLES3lIiPwPDb5XvANu+PZazM\nLtCRup0LjCpNpVADLND/6gTNcy5VyqrTiMgg3Lb+aaFtndRmhzJ+/lTxwqPL\nJossyT9U2JQ5e2e53Nc53fXBjmnFtjNSQuYjiasagcwGU175Z87qHax+k3JW\nL7jK\r\n=7paG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEw4ML+m7bb6WkFeUcFpCRYMA3gYtntfzdir1DM1WXu3AiEAt4NktgA4pUX014Ta8FpCvaAqCeuw9zjjbxbJ4frOp6o="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.11_1619612188228_0.696549857681483"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.14":{"name":"ipfs-http-client","version":"49.0.5-rc.14","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.17+12915f70","ipfs-core-utils":"^0.7.3-rc.17+12915f70","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld":"^0.30.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"12915f708057c54a08ed0b1f6c417eee8d65ad44","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.14","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-IY1XYP9JA8znq3adP13Hso+OBeEwUqGZREPPW/6nAJ2ERBl+T19Xcu0vtllmaudQqbeKHHTZSF7/yFSi+8vbnQ==","shasum":"529a017be49cdd8f2e4c393732f29c37c90b358b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.14.tgz","fileCount":435,"unpackedSize":661273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiZejCRA9TVsSAnZWagAAxyUP/3HWExCig80KwzJx0Zqx\nXQbPC2Ovf/JfOjpqtAUL7Zn1T2NYvnMDclzn0hHAXFS3sqR8TMQpXqbtS11r\nvu/uvd46CoF0cAJAYWFQVMGLmyPiu6XlT0oxXy9lnjTGlW/VT5fYvFkOD+kH\nDjokBAj+OCDAbTMLPDavcqFNGkD9Ip5Df0QQJgYBa35QLFko+ZqeyYPxdnkh\njOl+QqvA8SLYKjXoBkwIajRe5AWUuTSivMntsZJ2zPlhBR5U3W2nZItIzQfc\nVIo/o9g8nJjKKtAIvEmEjredCM1tTyoCKiLetanB/7xIk8r+iK/WnCGJpE2X\nMXK18q+8XbNQoSbutwOCZ1JQMI90mgc82hQ7DUB0GGq2/4RIjFuBuccfLbzq\nfhrtSXJbAb7oshSoAJBdxTB6fLTuYjDdp1tcSkRRe8TMmAhYWW33J2NJin5c\npGAfdEFyFZaN+Ur1WyecHrRXGV2rUGshXVbe1D/OBCZklJuN2pd7VYmBQvmi\nkthKHD5gI5dnLYD/zU+DtvMP3UMvsqgVUfsGVCUoPaPs9TWXiJsq1lYjtKnI\nRPwPqlPhM4KKaC1NbnQePNTu5/E0VgsvRIamHVfovdW6eG8vJVW6neuXs0hk\nQ5Dch0zmDMOnHMNSSUce3fqBbc/MYD1p0MFCitd4e/sSGjeeK4eJGhVC/6Bh\n4Gl/\r\n=xbdo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6MeGqM5K5nxXA3/2NPRls0Pt8XYmlGxtQebNaFeG0sAiEA5RBFHjIk/sb5d8ij5d62xUU5QRIpLovqiVTOGUIWP5I="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.14_1619629987005_0.23856125321610366"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.17":{"name":"ipfs-http-client","version":"49.0.5-rc.17","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.20+99bde7a1","ipfs-core-utils":"^0.7.3-rc.20+99bde7a1","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld":"^0.30.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"99bde7a194e5918933e589d685dec222b083ac42","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.17","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-CM9MpPhjSBjjV6rdX/uevXwgN2wEyAYl14IPqkp8ExQPDOv9fZ+jb/q5f/yaiQS4PgSjlnH/Z6sT4BpnCqlHEg==","shasum":"dd39a1dca898cb473b390cd845f68acd2df5485f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.17.tgz","fileCount":435,"unpackedSize":661273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiuVKCRA9TVsSAnZWagAA7oEP/1pLWc+fw76DQwNSXDcy\nlHOIlD0SNlCzgKUmI5Kk+vKL92yL9YpudGbseAcV9LBTqlYuf4bjJf3XUCgC\ndr0h5Mb3XgMj0UV8eiv5roPwl2xfEuRH1SLD/Yd/0MFhB5TWkMYOF85FoASe\nrO/w6B1mlgiKYaxnbjxMrGAOUD162AgewbnHhiX0MUKYHvVkudbb1G+VYZ6x\nrMwFvZTR564fE6txdEPxHNF3mNAxqFjE5IFUhKV9jSIAykmycbrJHhHzy9L2\nyf5yEAo+g5D+idcgeaLLxo6aTcDzUcrVzHEpEupvujVD80JUVGQnsaVngQO3\nRHDyc2aCZuIbRSkmtwG3qSlCFKESQv85/rGdopFKnJj8Vqxx+5ZhqA+KuZ11\n4hk2R8/701Gbv7mj7Vq5GApnHKNpaRTXddhovh+SWyM2I9Z3FtJGSMIsO+gS\n8w9XzjaMIhMJEA027QoceJgPXDkuXUA37bXqBV5jj/YyK9yQk77cu1TMbxMw\nC0ie2a5B4Ry7UcZt3C7FH/1iazb84uomA3NoaiUVDZ61L5xAPQL4zihQYYVJ\n3vvjs4euMi9Wojg/Ifruh88jefDb+wbI3YuIlJnseTP0o2v8CH64Ma3JfbBL\nnFVTzosqpyZTLZpaM6JLnydymwxW4eLbb/Lx4mN6BKHe7v+mp+n7K8nZDfg5\nGXBo\r\n=5ohi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD70JqKbNZ0g7WXg6w1zvAkDDmHRdJIZwVSbqfvibEYwAIhANLU+8mIY94ov/UmD5FGp6a8v+vgSwtXL+UIQEOr8waO"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.17_1619715401695_0.2591688315758729"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.18":{"name":"ipfs-http-client","version":"49.0.5-rc.18","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.21+2ec15c08","ipfs-core-utils":"^0.7.3-rc.21+2ec15c08","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld":"^0.30.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"2ec15c083eef923096b30dd927801331e97b4f5a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.18","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-pX3M5Nzi+ICdaQbtlflGACYC5B5Fe4uHpZzkeY5wYX5jW/entcemhF7ddBa1KcOcFW9p35wB325pMLHFxoJL6w==","shasum":"73931accb994bcd5c46619b4db47b89cb25fe7de","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.18.tgz","fileCount":435,"unpackedSize":661273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8zZCRA9TVsSAnZWagAAkRAP/Rhn/SalJJRjS2ZthIkz\nEnPNGLfg4mePip4OWWDifAdfHa37uZDNsXrEIfd6RuMkK7lYpd66a5rWLJ+J\nXeKsjahiqGHIl6jFe7kd6/dNg3TS00huOsMVqcuHXoeCzIfE+OCsc+3oUXHt\nUAJWMlkEEX2HTgi3IurZgBtrK3Z8gaXn2faTEIyq/jBCrSQxsvc+IHfMbc0E\nvUS+lRlhLM8fcp9qgFiY/nzZLoBL62R1l348JmAc6gQQ8YPEnWTLPx8qS55I\nvw8KMz9uD1ry8gCnTAxleufjzVIcres33BowdtMNHJPv83Eg3VEb9KCS803p\nAg3n8ssW1AojSxT7OUdvVjrSBSzoOLA/JnACxPEd8Ws+bTs1XeP3xHReBWdj\n177/Z67vQUY8vDn+wwWs5yjYAcvuNinklBSbTX25WhXqBYe7NtvR8ITXM5M6\nRou7t4YLfjfxzojWe82qMSCk0h47WideMGx9AJi5vX56htQL0FlzJ7ErdNY3\n8YrF5T4x6pu0IOTApFkevtXjQlujxwynInnn7Lmmq0zQxFWDX1Ct2HP6AEGw\nmqJElDkQbUUK/yLjHbvKCuHnEnb9cx5CneoAjtU+n8mJruCgs3YP9gVbVudS\nOd6DH1nGz5NLhZFVPKc+8RnpiKURVNIMzN6jjhqWZLNvjCroXT5tvVfdbqpi\n08nB\r\n=eVND\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdMg4o421uhbZl11kTJX/57eOBCys5WopO/utN3sdIhAiBt/QGVtDIl80VGupgVl/MskrVjNN/jStYalpXL4p34kw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.18_1619774681494_0.08706870251056875"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.19":{"name":"ipfs-http-client","version":"49.0.5-rc.19","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.22+188f1f39","ipfs-core-utils":"^0.7.3-rc.22+188f1f39","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld":"^0.30.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"188f1f3930ce2dcea5a4fd6b6b1cf413ca04a736","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.19","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-jayEHKTRjvp/iSy5AOTyTorbBpyeZWRBknjPTtC5riWKlXBATHXs8KJMgUI7EGsARLXAnjn70JWxAGeiq4Rx6w==","shasum":"91c54f809fe20a8c589c649bef30c1172d294101","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.19.tgz","fileCount":435,"unpackedSize":661273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjDi8CRA9TVsSAnZWagAAqtUP/REibfS6BWItlW+ahizh\nWRsX1MAboD8bMrgr8dShBaFpu0hK86c/mR4tnwaSNNpXVRMsVbI4fAETh/Kc\n9/J3N+5hhcG+27Dokqk+4hfTBohanb4hR5pRoD86gazbktcfY/ECOmXkqtL0\nO8J1nx+HhlQYh3j7IQsqoY2HFzkM4Hw1xaMVIb4MFTfaKi7nfjwU5luvYcwD\nCQqVE1J9XNZTt1LViv3lisX/tF7II6vGtCreCc1SpZgF71fQQM+WQD7BTpvK\nnPYUHBqewoZy27e+EB0EnJlWjhsJJjT/tlh3qFJ7wDWZBnYF/zrZI0YIXaFL\npxBJUBZ6kLA85ZpZBUhLE1n/f/futMqcu6PiJMssC8vnN3GkOyryMAmP5lP5\nTmQtckzftLTibEktEq5y+ij8UWS9c/vYZ+VwXS5zWgCM8evzzWDfk/RPmz7A\n2xJllmSTNf3LWA3l8wECSNHdmx72G1fmyXHNYnRhbglmlJr/1/eQfFrLEssF\nSaEQrfEqcrutPgWvHHgqxxzWu5K1ByCHh7vw/+b8nKVeDZMo0XN47X0AEVYc\nygXMVWehxOGHpYN+QkLPoHpr8MoshJXFQtLT9gW1kfh9yfJu4KTO9msrLHsR\nH5CmCcNQ9BqgC+0DZBeEQBw3x3/9zSPYL8WgPfvNDj0vt49SbrjKTnrChrVR\nvWm3\r\n=V8PI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHiSK77F5aabfhRlhEevRsPt6PYsHMgu7zmmaZVGl1yBAiARfqLRrVkAlq5TrJMT0qoscv22sbe41zFzFqu07pjLxg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.19_1619802300160_0.9031076473822599"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.20":{"name":"ipfs-http-client","version":"49.0.5-rc.20","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.23+1a447f89","ipfs-core-utils":"^0.7.3-rc.23+1a447f89","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld":"^0.30.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1a447f893072d482d5a7ad148f9232dd43f64cad","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.20","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-5PEaz2Jf/X8QiQ2hNq1SJnaWAK9PMCwhzvhgXor0SOHdWAyoRg2CFQXzhf6GE8hKu927J5ip5jhubQjbIsfCEQ==","shasum":"e038fffb71d3b03ebd54da3e2292e57bafa885d1","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.20.tgz","fileCount":435,"unpackedSize":661273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjZV9CRA9TVsSAnZWagAABFwP/0XfBJAwxA6sWsgcstLy\nxT0sGGHbcKf0MvNi0712bN6oIbxHYdZgnuX2X8I3tirJlCoXv7MbE7Z6Y1F6\nC/81XznYFvQV7igW4f3fHXw3E15TbidDsd3xwYCxfhrppYSB+d1CTR04nbPI\nK3ufDaY/BNYjAn7p+Oi7H4zsh+ikBVScWrG4CWIn0gJQ4riK/o46Ly6jzB0G\ndARkdA8iJnN2mC9mqvpfR4RQeEGN19byc20+9i/KP2qZJHzRBVwLLZCoF0DT\nje0WXya+di3c38EVVPM7GFBrR9Ru/tffsOB7mWZqKvhMA7NKgO7fd08lUQrS\nGWZ4J/dv3EpMw/Obf1UidChzYk+83zBT/5euXuhfoE5DYfxrWwQCjMBf9Kuu\nxvQf3pBRELS51Q+AMJb4LaPELRz0aAw4+DRe2zQZJtp/8nLh4yS7Ng5bq9jo\n5p6HWZsYa/VgZqAtKAuuYYkXnU7aKtD3R/OU3ThnB7jLJZbsDSvfP0KiIhj6\n51o94fQ1RZgo5oZMvkM2uobsiva779rH1tHP/DN/E24qgTvc/cKk2w/1jZ1C\nYySLXi4ZCwi485MZta8lo7R84JgQDlKiqeNv6pKuGYjAtyEZEuFDys8ca0pE\n/NPGM3Gzw7p4zNG4TpU2zIvS5Sqnz/KuPTVj0bS+g8V9WDb6kaf5KI/TsOSW\nLmBR\r\n=yKHJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXP5YBPvQJGRHDmD8bfZcPvQam01c3oymHWlvMmzFlRAiEAh56KurUNsyKEZg1HaqIY6+B8bR87HTH0ygxzYAiwiH4="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.20_1619891580911_0.15360469862598403"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.21":{"name":"ipfs-http-client","version":"49.0.5-rc.21","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.24+21b70a1a","ipfs-core-utils":"^0.7.3-rc.24+21b70a1a","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"21b70a1ac38d53265daa52d8c0eef12d4e3255f8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.21","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-86OhnvLDsVe9+xxQDFujKGNaYYlLRpj746xkFCb7WW6TaLwoM5J7R54P3n/ygrUramz88JYY9LAJLwtWkfpbPw==","shasum":"0cddc94adb3d3de614cc01f723a8490314585e25","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.21.tgz","fileCount":435,"unpackedSize":661524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjmo6CRA9TVsSAnZWagAA9R8P/icjTkqX/9Kh3aZ2nmKt\n7+MZ+O7FO9gAq7qb3JHpydXOBsR7YETaRHlOKxnueKJpswUq20X0eIKoZKmL\nmSAJ0GUl7YIsUaGCDYprfxn0PSiudT4ULr6fgcqkfoNrG8+1VybNwpI4oY82\nil7w74OOCswkbVFsOrRLBzF4OlmFnMm4YOYzJWieNrkyfFr8Vou9t1h6x5/O\njHSVwvEc+opBb6p2vLNtYIYfjmpNFZgkADlzU5zUPfrlMWOaIoABPNb/HnVj\n1842LnHpwS8CSZQSYBtRP5n3mf35ESJRaGwpMGuFvAR+UqO5NsfBLp4syW4L\n86vBn+pSpjTHO7YI2qnajbpTl7M08Rxqo2M4EEq5NHyisBoWk68JNDbNgKUq\nDbflrmAMI5x739g/HljLlT+GsXPIPAYigkTCJvxzBQmJgqWcYZ8QkEGW/N7O\ngWF3mqBY4jxES29wYNbnlMeiIwi85057A+DcQp6VoBwmmZtcirDQL8xEVEFP\nF02Pw3f8QJcsJ76Z3EJrIa10gN9YmVbKOE8K16dPxlD2XYb43q2v9lUHKTbM\nDrW5IP4A8zN+XXFZoxBm+LD9is3v7J3mGZPXl38LfPdG8EtlFCh77q9ote1j\npRSXs7BLyfP7e7aF10KT5zs5l9P14ndxsNmzQRhNOPKq3XuiseNddzFP8mzn\nn2dw\r\n=8QhT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaJBjUJo62I4ILsmiKzIMUp8Jyqw2uAD6xDC0IIu7k6gIgK0akn0Ab7HJBE4rtAEBN7PBAlXzaAu370zwhtFEsV4s="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.21_1619946042385_0.8898417813842219"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.22":{"name":"ipfs-http-client","version":"49.0.5-rc.22","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.25+0a4fbb4f","ipfs-core-utils":"^0.7.3-rc.25+0a4fbb4f","ipfs-unixfs":"^4.0.3","ipfs-utils":"^6.0.4","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0a4fbb4fa20b17d80b75fc57be49fc8cd7c14877","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.22","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-J0pz8aWZAWO2f7BflSiuGvbb5hqmW3xiVgHhBhUnNr66a76K2S/LDSAZ49zNranj+g1C1OFZpxSx+4GYqmlSng==","shasum":"5150eba4c05aee12d8da99031c49bd91b83c2a52","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.22.tgz","fileCount":435,"unpackedSize":661612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkPuNCRA9TVsSAnZWagAAyvwQAJVhqAuOPgMqdEmc1xtE\nO3wdRU8phiR3dPWND1f8NpgEyIDQ5Qy2Ns5h8WwZRyeDo/7tqqv2y1AsgFDS\nKHV59h8xREXwT+kMR7co4KE33Lxdyw/AYXbbpCYFvvb23eypmDQRyHnzmgnW\nzy6LZnANpPW7+RLjbB/EO0jtCRkNyr2oGJnXsPzLcV2Fh7PN7JRS9H9Hc9Wp\n4UG46W+gYjVHqrcD+4HDH/+f0ECraTESZ8c9L0b/GwcVj9qvCwN7V19/lfj6\nho//1SCqmyCsc4Qauf5ftAjC3MxZSR7tMbDPcmyckKT4YOYFHe9I7t1XEx3R\nwy5l6TftzEYHTX4ww37C7GVEc27mI4J20u4+fzeoHebVGmj3lNfHdL25EL1I\nD9SWcggDeGogRUG9k50b124HLaDqJgc+yVALGxGeOHfRbSyzxtGWA0QxvAt4\nJv1CTDqURixIEcFQqq+oKg0h7Iw+t2z+/gViHNteouqNDLVW2WbTbMeGpu11\n2a/RexGwMHPmO4ia0NMsvWKns3/CMEkk9Ieghju002rt2pdkBv6EOwA1DdKx\nwI/EP4OIreICAsw+8QwwegwbcIGo7BeTxOcDqpICnsQWufjMcD+yZRyySt9n\npwgcHhwptNhzd/RezjZP6ay7zyW8HzFI7xTd+Ma7L3AIYW+rZu20KDM9BNQp\nKPrA\r\n=At0B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDaA7ju0/SRGM4k+LYxnhdt/LH/BWX3QGs4U4nGugGJHAiBHvcJopggdxjAALyOdVJPJfFoXqCPbVSZKMREVOqVVzg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.22_1620114317228_0.5155039067106004"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.24":{"name":"ipfs-http-client","version":"49.0.5-rc.24","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.27+a297e8e4","ipfs-core-utils":"^0.7.3-rc.27+a297e8e4","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"a297e8e4770f0b8e88e065a604acd5928e561419","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.24","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-STLKprAvNzU5vL8bCMxDsKuVe9iQ0+rGHJaURn1z9OPzJIch3HApcxGx0qKlaCJxEIxzHiUAbjmyGAPRyo1jPw==","shasum":"afaa05a990ac8ea61d316200e660e6c36ddce180","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.24.tgz","fileCount":435,"unpackedSize":661225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkSiACRA9TVsSAnZWagAAJiEQAI8xf2MiBgBFUaVijfIu\nGuukNW9kYngK6dN2Fg2UK1Ine8ekYgZn8MigKxUI7rEGMuyxAqKpnShzRH6w\nxgdcpLMLjYSbPhAPy0gtLrb7HaiNxK5KZ56hoOd5XmbLBWTvHe2YFbpW0avL\nexAdFJRwm3fp/IPzG3tJS2ZFkBBPD627w03KHmh8lmgaQYXuq/Dk6uuzqR2M\nXkbykH5Rzr57pZqIbT1Mu988xd2LybjgO79ZHcb5e6GyR1lF+Ga1cCY7Uc2M\n4Hb8OHK4eQyCmFTGp8nojx4pXZytNNEcRyMvRpm6LkdNvCGKOzkJMzkyFM8+\nsZzVVCM6++mNVaV38Duw9WUk//OjODRRc6Q3VEAs1bawE2G51uqpelzioPTg\nOE7nsBFshzNxKU5GpAikrSJ7MD6UNQBg7/SNB+A5JBTeyK1u/VPlrQfKw/C0\nEQ6JdxoeGQpGfujErzd8oIlMaxltN/PCr+tra9Q0b/anctrvB+NiKe2cl7zc\nokmkNEKJRrgyaKfdWMEz3Anbn6/x4Ip3g1EuLZ4qWAC5fEY1nebiuXxMmcQM\nNXWWfDAK+mufDsMs9P8djAHhtj60WlbIoRFRly5S0YpsC5IuG5d0SkunU0BH\nEKUNW3nDUB1d5VVkyenVaHu3tHkerO4YiypZzp1AhPTgz7PucbJt6mQKWj1A\nc7C+\r\n=MlwV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDD1zq101F+hL+HVU6wgD3EIY5sa9gV2yUkAwskHjmoAiEAzovOOts6PieigZd2d29PmS0sIqpZykxBOXI/kheqw48="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.24_1620125824076_0.6237452879126286"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.25":{"name":"ipfs-http-client","version":"49.0.5-rc.25","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.28+09a65ff2","ipfs-core-utils":"^0.7.3-rc.28+09a65ff2","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"09a65ff238770978bc9a91449c9d76896f9db8ce","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.25","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-x3dP3qXRlCIPyAdRkDUfAeiv++jLYwdgmd7ScyLzuWlld/4lothccu6JC3HLT6n6kv6XCKroC1hpaeutDDf+TQ==","shasum":"17d7a2dbb9e4eb01ed391037d427d49b7fe8988b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.25.tgz","fileCount":435,"unpackedSize":661225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkS27CRA9TVsSAnZWagAAQd0QAJId+RzyMTod9L6D8fgu\nbE8/6lUQwf1i9Wtc6X2XyDByvGuW422I7s58nW6qkHXhKnlO4ig/QRH2ecOw\n+5CwIMc7BcggYSOTn39BR8RyTq/IhDX37X+OXdCG7ZGBS6ndOD4oHNnm8UBY\nlJxeFI05B9yEaZnf6UP0g2PwSsE3eLe/w6iwdIsjg8vEgznHtV7fxcfEDRJm\nuT+GaI21PfsEuEsGIyiVYGxIzSbgOkxO5ypj0Ux/N6yWy3CjaRgrg0ChGc/9\ncbN72FSGBdJZ7+ZUprHIbuHkIG8pov2HsSC/gF4jhv4iYWvH//1l9Y2tmm/m\nCvU0ZWjvI6hJb0vgZ2VDuVZYtH9oDz88BJ4dRNg6eWMwI16++0HljgyMenOh\n6+ZU4seiKDzYnutc1LuaVhnhYSCd3LZh56hpToFT2yiXzFCRg4LCEvaXYV9i\nKEVQIc0pBGi8p+LAgBf63vcBnczMyKlT5MsL5I0AVbmVGN94KIeo4cP48Vjp\nlRRgH1oh5jt+mnFDlTvqquqEgDfQpEo8zgwF16w+3SKCGDD8aOny35X0+leT\nv/ZhxLQW12FsNaYtkRaDCH1Dep210sYnUXipYVVR7uAKQjNcHqJoisbgE88H\nJF9eCzKCklL8EtPUjTbQDgvZBrfT5uOdbgOyOQp3UbZ0XoFTBIEJybmyuNSW\ng1Nz\r\n=Fho9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAk8OC40feod8DkodAuW7rfP1mTjEmvc4uGDRVArE+dQIgMrEdfAAwiU+mccRh/XqVEwmW7A4uQIKIYF9n1PZZ+qU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.25_1620127163093_0.2644543198320066"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.26":{"name":"ipfs-http-client","version":"49.0.5-rc.26","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.29+1173edeb","ipfs-core-utils":"^0.7.3-rc.29+1173edeb","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1173edeb04e6497a8e4d2336c83fa8c450fc9a24","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.26","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-mFgP1uubtYGGwjSWezFfFOzSGClpdPbNw5PhYqp/uPSjbISEyLX8UOD8X/bjeWwACnEsNAHyOhtW3oM8J1MeTA==","shasum":"90c170048601bfd97765603344be868daff5bd0a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.26.tgz","fileCount":435,"unpackedSize":661225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkVJtCRA9TVsSAnZWagAAp1EP/2zepRb8feXtsP6950dk\n3ZKLZfJ4J43P2XjbaXg4TDbrh01O5W6W8vSd6+Rt0kSaHnBMLl32i3pOjWH8\n37PVbZhHxq7wyqmGgdx3NKQ+FLFd3UIh6e71okAKBrParV6Pek3LmdDC8Lor\ncG9cqrkncJw/8Mswoe61KoqCF5MJlXfPLc1Si7v0d+O9LbQZ6rJ5dgk4zfan\n7CH1Cp93se4OJHlF/gPOTcw8hL1ZJ26qe9fAlCbTYLGuWm+rpI33JXwZP+Zg\nHip05DBdGG6vyVEWZGL7S+rIx8yR6y0UFT/GZFgdcRgo/+k6SnqJ0VUEI+Em\nLGjfunAWW64OTj3kEP3gWEeHuEOX4hLSMFxMskfR6icDoqs0CcbOpTVn8ABJ\n66oUIO3OfuTjLqsMrbyx6g8lhlCqHYxAJPTZnO5a6bgeY1MxG/3PnKC2SsO7\ncS+MvqcLCMBQE0/wI8pUfh1/DJswgM6mleWdQ0TjE31Tjw69OKuoRKWmmnYS\naYZWUJhuFSzyd0xCwS7LwJQb1233Npkl8loi+iLgQ4OgLTe0t+QFyOsoXUcE\nj7HDr/dmB3TzlIQ5GzRIdIjw87zgqqhFP0gW2/a7NQ2Ns1sTDd0N6SQYExV9\nn6QYNg3LnJipFh7XK2KXjzH0egKdf1xwN2r2oKR8PYTS+WhCd9w74Fzr8Hoh\nCH6p\r\n=EolJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb4Lk4eXitxJsXOSVe7Gu9GrUf/LOLttInmbX7J0GE1QIhAPegVkrKQ067EDGvgTUQm4iKKGJhwZS9ZkOtN6X8lFRD"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.26_1620136557257_0.6596427564854488"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.27":{"name":"ipfs-http-client","version":"49.0.5-rc.27","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.30+3ff26938","ipfs-core-utils":"^0.7.3-rc.30+3ff26938","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3ff269385bcf0432e94aed545f74ab370d664557","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.27","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-1oac8Yz9M5BKiWjunIauhprfczP5hkb2d2PD2FgxaqeUJQPKvJTBhx5CMy51M4SS6UFXJmcg70QXfufe3kGfXQ==","shasum":"e66d9d70ee91d301dda33c138c88347e01140ab0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.27.tgz","fileCount":435,"unpackedSize":661225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk9ZPCRA9TVsSAnZWagAA/p8P/3+0RCaxwbznLLcYY74y\nE4WTQ/L3SbuyUvaEZCic0B2sT61OsWGYWDaFAzLIf1oEd40fUFxNOruufpAg\n5TEdtVwmEU4Rme05r/uvJuSnkrXf1s5e4NUZW7a7oq3+boPfNLK4Sc0FQGzM\ng+C1oBz0lZ4xDUTxgL5XbtjOOtltQMdtvNjyLBgoevjxLBkbN99rPwa0e0Dn\nmZquYAKsAx62XTiri01gma5UmieJ1UbwrQjcbKIS3laLtcQSWrTQ2bGF8voQ\nSepnMSg/nXRY0LNC6tkmQD8ehjlAgRAmBccQGv+pueVXyeCZ3+jyG9hc6u4h\nU3QNYYBMeCEuwQ2nIZDbFBr+9j/xKc9/EeZkL+rbJXVFpuzXW6CWpp8t+k3R\nmAA7lg1xxv+wN642Iv2E84cNpKMa8hTGt/sc70qKtmWDQwkeyRI4hsTbPZil\nvyTX0IJLKJZqxH0LcedNdW5XoQ1zWhdEy+rjAihvuL3YfM4ApeLf9l4u6COc\nFJORVv8HrzqoQewlVH+SNki1I4xv/PU5PZ9MByScNbyospWRwiPa58uzHn0h\nMhsQid0IdcCSLFVS9mDgT6cD1JXtZPCO1BspjpcMM8dVR1vIFanTbVFZ5woo\nR8dvOX5CGJqGoPe38wQnkyMMLj7zikASHpervxIN/FRtJI3Et0vDBjCBZ7dB\nhURw\r\n=F8/f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpnrmjSTLiwKV9q/zVcIhkOXjiWcqffrCz+cn71BawxAiEApc4TjFMmqhW1bxs06UjcYCjgrfB4J+XSIv6PhoqQO5k="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.27_1620301391301_0.1476390781645207"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.28":{"name":"ipfs-http-client","version":"49.0.5-rc.28","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.31+d5897854","ipfs-core-utils":"^0.7.3-rc.31+d5897854","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"d5897854419e83a146dc8cc01de04e73b250d07f","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.28","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-GJWhHzTVpQPRETU0j/3RSL8ZtqcaprZFsiudaZ4WKabqU3L7VeT8yhoOJ4iPJUPMDPGQJyROOjIaFiHUyQlc3Q==","shasum":"f9dad942c31c7d78be050f760f2de491f5d42a1f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.28.tgz","fileCount":435,"unpackedSize":660986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk/qkCRA9TVsSAnZWagAAjDIP/3QDHw3LdYW+mOOrd59q\nHBeycBVTCPurDIpJt3gOsLLHfHWDL1S+82/zlsmJjyL8v1CSjjc5RDN6D1rd\nPtNa7DIv1/Cju7rA+svuealISkvrxU5XtFk8ipTEIq2CMLMYSQFQmWFQvQnT\nwYLi9XYpV0xIJ/UtYJyF5kgVEWUR/0rg7FxQZL/aQexboaEdtpULEeMTU0ro\nvFsqtAroHGDZId+PZmfbncQi2HjOVlD/aalA2ZZEWGBHGQm/msx2zsZ9bDDL\n0kdFH9PBfIY5uHQpxwr4wChDvSKtpsQXrnqdzS+628scvJzmp7z9wLl+Cj8z\nhjMpzv85D7lNGFpluxAeY+g7JK6hkFI7Do0BRO+xg3cqHS7W3934k8P8dcai\nGPZhB0w/PumOWTIsB2P22YKYHhafezXxfcO6To6+JDXtkdl/9KzKHFV5SZDX\njo5S24DfFyWquzt8QRZ5ez5gRyyE68NItoGIFgM3A73Ry8vpzcB27Sw/Kcsi\ngchSHnceK2KRKAKZigOHS9KCn9zrsaBWeXEv9u/N0G5mnVhp0Pg2jjc1Uozc\ntwtjlkE3u4fLjF1/x5FgF7oby/6R6DtRpVewOZH4FfAecejeQAL7kUENXdeM\nEaQi26lZ5j9I/Y8doj4MWU/6yF45Rau7kpIKHG4IYuoymROiLxNFed7itO63\nbGTL\r\n=ABgz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLAJ5IboRGr0dz3GH+55VyJynZTqLrkitYSGZYjAzuYwIhAKyLpNQVQ3bUT9NCtmDbm0Vr7D7DjwO4t7CObT9uwaQA"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.28_1620310692480_0.03416555643448982"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.29":{"name":"ipfs-http-client","version":"49.0.5-rc.29","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.32+3923133d","ipfs-core-utils":"^0.7.3-rc.32+3923133d","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3923133de800ffd5a5550da86b7bca254206104e","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.29","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-OimrSAqh5eB5cz2wY231Bt3rg+1aO5R2QaNN8QxPmAYNJ5p7PvnFuKKkwj/l4bR+6SPFwZJxuSqCy2fdjNAbow==","shasum":"84ee2df8d216fbc735d903003bbcb9fefe96433e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.29.tgz","fileCount":435,"unpackedSize":660986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglSuZCRA9TVsSAnZWagAAymsP/2eGghoIylhqQj0aS/4h\nZNw+MY9C51QzoMUKIBFdL/+D3eT9ufjnrnLdNwp0QeV3jeKbHGagOPCCT/xQ\ny/zEp76tm62rC+xuT+Tj1lVFUqnIaMib7s4eOr3DRC9Bq+jDY7bYZrQ4ysta\nL7ru5Zva7nnpqdio30t6klt5ZUOKejl9IboqDUV7lU7gQHNUiDanacxvEft8\ngKNwqRQ4doUDwhXIOWXZ8JLT+6BrwROmXFPwhm/VGKSsLBhrb03eXGS2O7KF\nxJZ8x3G3XB44erLri+/udSnzX5dA8Utb6VN67RPCWf3dnVB+j1qpTzGXVAp3\nEQaYjIYd2+FVehssdCwR+GqGY0aNi0mDoFwgb56rdK3sIOQfLIADVD76ueo+\ncM1W34Q5u5GlXxh6CPUDnt3xh4L7nQXLCTV6AGDfT+MSr5mExdBsKr3K1Ecv\n4tEytERwUX/v1/xVt84mJm2xgMsBOQBsTfJ5Gc3Tt/N+b/OwJHBxDMnCEwiU\n7k2qEaLoGGBZv2PrJoYeYF1+J0IiAeejMrXNHPQjzR6EQLDQ0+18/bABvEfb\ncEPPgTecfwUoB3JOI3NJo7IqFTrPk0kvofzsuygr3GRtJRHepOp8pGHqWMsj\nlOjHKoPv01A8qauaDbRjLeYX0jKvtQeF4vqEPw/PSBUfuV2ai4txvLIt59pL\nqGBE\r\n=Yk61\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzWttW0XrziJkQ9o+sIdAFzG0pLFNYY2KvgOx0hbgWGAiEAm84/BM9vAW8IJuoHpnnGnZVQhHlvFJ/HiUDvuGDr1PE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.29_1620388760811_0.45568644132761693"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.30":{"name":"ipfs-http-client","version":"49.0.5-rc.30","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.33+cf78a190","ipfs-core-utils":"^0.7.3-rc.33+cf78a190","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"cf78a1900dca2d466b3694dcf677eabba5ea3b17","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.30","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-qn29thpa6jGCJIibx8JRaiGVVy2DdmfI85bd/D0sR/nbDg8kJ3J5ZYu2fwcIIYB7P6/9cB9aVq+QuTn7LVhfXg==","shasum":"e08bfbc2b66510223f44ba61abf1ad12367a125e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.30.tgz","fileCount":435,"unpackedSize":660986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglUMsCRA9TVsSAnZWagAAyVsP/iI4h6KDv6Sz1Zaabgnq\n7/RMPhySdTKLm50gNtx4sxYTpz5a0mqX1FJLLd5CtyBm90ZO/T5hm5liHGRt\nzxsAhwX85oAKvDqEOfR0EbzIu2kWbd5qfvvmQYA5iSBSk6N6LRjBcX4Yeipd\nMSihM3hfdY+jrtSfrn8nvOy0FDop/P8wwQuZZytRtKZmoKDBDJ8d8/RuePRO\n/0jY451rMDCn+tD8uednPt3/bAz9kJ5JCEodfPBs/4OgjqzjBEV1D+XCCOmJ\nK/MUhom5e3ClqnilN0R1hauI1OZtlDdiF6I4UrfXWmYTGvSCJeabJlBLTn5K\nGwolYyOHMbA3D9E94JJIoH25Unt0Dvin+SvHh350Y1KBxSyPmZbfrTp4PQjK\nMmN/Y9k0xuqEYRb1pE1Rthj8NYvNCWeH9LsySEQCn/zzFX184IaMcsrb9qIA\nSdIY4ATOH0ivCRozv9gPTL+82m0gFdgPDZdELUUiZlGCZnfCE7aEN3YFaWBm\n5w8j+VUk6tpotpy9Lrmm0FOCF3J7MA1/RRFFVEt69EnuNEWoGlq31SHR7XRQ\nqs5CdddeWILjgh7d2i4Yh/6yki7zvhys0sSQEa+LqgeyOUzWDaix9MWI8XS2\nnucjcDReUhOBZZSZ0M0naHwpYirCK7PCl/bWfif99mmZkARI8MEBVQ0d+6/q\nSno8\r\n=qPYK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXhpoD+Cmo2vutinbI+hZ4su/5TXGREZFv9z64P3vXGQIhAPLBXtSrwAExdru/DHji6X2WoR4Hj0ocxEgd3s+31Zk2"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.30_1620394795553_0.5477994757943769"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.31":{"name":"ipfs-http-client","version":"49.0.5-rc.31","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.34+fe6024ce","ipfs-core-utils":"^0.7.3-rc.34+fe6024ce","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fe6024ce70fe83da84bfd938d725f3e6814d0e9d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.31","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-FVcNvlQnaicEB2aCUso89EYXnMtHKQV7YBkhY2U+dB8IC2yRkcJlcAFZVwFMQiOBJa46q8tQHGFSQLWkjkPwMA==","shasum":"81d7f25ce207f06c0cddf4244a955416cb067d60","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.31.tgz","fileCount":435,"unpackedSize":661370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmR/CCRA9TVsSAnZWagAALEwQAJQaS7qLKGkuYVQ0bc5r\nqIVTPV6tOauNXsQICrZ2L6asK8Nx/gm0/sptSSNdAJ+CCD76NpITaHOiwOiS\nRJ75vQOCZm+PAqYF4QLkQTY+FP09KnAJ3zTCVyNa8a1uy7a8bS5Umjoa+dlk\nwwP+uOqyUmh3exsKB8YeOPW2PKGKBfaI2yTF2uC0LyuhVEr81LnKHdIj8YjB\nPhAOg3Ny0ZHcsB42v5UpkmcUmxKvHO3oGKyoR1an1osUiArrIgSHN3UZX3zL\n9s0uaDEMURmFW6LkwlJJphcZiseCRkabkzuHn1uvVJhv8MGMxaSyrSledMgY\nmFbbObf9p4urA3ImXFM3qChsBfo1W0DHmnjz6QOPJ1TMvmGJGkri8tYr75Pu\nBLb6CllkMCVgAEaqsOuys+E/JAZ0siS9jJ4uNgchkqxMIcUVe5Ndd1xR7/H3\nQ9FyMwQKEt63rqkO7SzfzvmBCzFxFqu/z44PcYQ0eJByFdwr/T+FrOW+brUV\nX8CXeE3KFa8MIqKSmfFEoAD9NeFl8R6T7flTknV9i1NmXd7zMFqK3x1hzi5M\nSPQQtrYZIkkizSMJgY4WF1t66WXXYcspYtLajJ0zgocqZSCPh6GmlqNxLy/P\nHGhbx5aoSSKXmyVw6GPBjqh01p92DxNW/X98GOs2vqZgW/ba5F+G8HNgarMN\njnx4\r\n=nk03\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzQXqiIwX5W6fuCUojl9YxAY1O+4W31p5pBop4BEVvSAiEAmlQTMFIXMVzd2pIZdjE5M6Z1ZbUqvnslFy446xyNKzE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.31_1620647874137_0.19073331200062849"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"49.0.5-rc.32":{"name":"ipfs-http-client","version":"49.0.5-rc.32","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.3.2-rc.35+bda04d10","ipfs-core-utils":"^0.7.3-rc.35+bda04d10","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"bda04d105587606ab2d7efba04b232bc89b1edc3","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@49.0.5-rc.32","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-5N7rwjcrLkaokaqW3xkp7rn9lBx+F61URzJVIH0/AJOf4Pqc48kxvFxODV1x3H4YB34It1hyEC6FaL5Lt8GYSA==","shasum":"36d6c62940303c4fb1648f3afbf92de4f636d773","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-49.0.5-rc.32.tgz","fileCount":435,"unpackedSize":661370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmSU8CRA9TVsSAnZWagAAWZMP/1b+nY3VUWMfEeh4loxs\nBWZv1cW6R/tTGdE1csQTOaYzykuBbwBcQRj7pl2/HGjG4I/XVbbRt+MvhL0o\nSSVkHZlZ4D3nZHzrcMJJCFJkygQZn9wFPYNf0Io7ReeKi6kdgtCtDZl8Y4HQ\n+mK5Z5h9s5r3xm4E6dErl63FWU1yj6l3HM8a9p82cC/pTgtz83chNAFW6fa1\n7DWQC/ofEO2DR0oYM7tPTY6rIqenS481aDGAwZjT+hFmP0TZ4+CRaE3rswNE\ngLewV7AsVz7P8I9jZ4ZOqybaBnCq7gZmcHFeDD7Pplm1Lh4EX4m9TyOmBc6p\n1Tk/AOqzTCO7jRnwIjlx2Nz13r1ApKbrFTU1MvmA2+Md4qqxJQcKfVBoFJ0s\nIhUommnyhxkwuLTar/nENRnFldr0e8f9EubEbzbzCkNegO3WX+Qf4ndRPmPV\nfP9Sd2YAF3niax70+jU4bOY48C3vFbzOmAlCA4A7iAakzUVl6YC4YnDqv0Jw\nqEg7nxv3kh3XTRQUvIGJ7TQ7HQO//xoScO3CXj+mWdlUDEntg9gBWL01sAMt\nr57Gz/LwyDpb4h23XRYS2xf5fOONkgJDm3/0dFu/rRhJ9DQ/aDbUW6USnbjV\neKvSVoYN/y7z0CxyQDqhJ2avSrcsnAErID3qulDqnEKj2WAJt0tqVwgNNdZn\nlXfL\r\n=3s/A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0WwMkBAbZ8I6TG/EZhoaI/hq1aHFb8V44cUSw5sRJdwIgRcAwGx8J0iPZ98kOb+W0hBtJHnw3Unq0UgHevSfriic="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_49.0.5-rc.32_1620649276237_0.2717482512575369"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.0.0":{"name":"ipfs-http-client","version":"50.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.4.0","ipfs-core-utils":"^0.8.0","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"99053f721305d1905f36a16631f036e883cb02d0","_id":"ipfs-http-client@50.0.0","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-3h/wDgyHmzVOEV3QwjkKLCiKNbAAaNe/PykpYAnleytseAzPZgG2JZzxQKWZTvcoY6wd1+5akEyrkeC9kv8r7Q==","shasum":"e2f66798150a725c8d0962cf82a2597f36139981","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.0.0.tgz","fileCount":436,"unpackedSize":668911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmUjjCRA9TVsSAnZWagAA58UP/0osLCxNwP6o7UJtghfE\ns8zB19SOG/z3ztUmidc+XMgTTK4JYkq4vzJAfRlsbqfLoeV2lnlcaMtMoajx\nd4GVt43DMBDlvJ709KYo2P/HKm9e15Q9zXbT/nOcx/huhtNGC2daCLVdfCWq\n9zP6eOOZ5hdHFUl1S6oRHDkyI2/hEsjSN3lKdpaGe3n10jvPo66ORBWCvwuY\npw1iChnU2A0LaK8Ctn3/LQNdkZENxMUwVtsDXEk9mbrAqD+u7lxNx40j7k4I\nXw8CmtjDpvNs7Weof6EgaObFyPc3Ue/T6+PSupDwlDHDKpa9ZAmtcCFuQoAN\nHR1QFYQmOnncceyfDuZqbEfnXDBzDvM175Ypk/qlMkJ4BdJl7N0U9UxdFUgg\na/pXHKAdBOx43tIEv9mhrIROquUr+AYHWiZCZ0c5HQbyvGZ0f3rCuZyFlkAk\n4IiNQNILCJ6FCJjsM6YVEcUUImDtGtZaxOZ5LBRVvMFvYpSKtzH2BiQo9MgT\nEKB7I/98dx7h+TILo+UvllaWEraV+6tX4m27uHa/5njZwIKOFwWuUQHRhK9i\nlTrO4GLcc08m3FCpIg7khMkQUzxQyTw0izXgf5JnMLPK6Lt9jR0aSOzcD0pz\nzAwQ0jaUiLt++mjnkI5oL2YWxkYZcFIU1K8NJWbxPu2VpXh3ypUeNeYIKrkP\nPfsE\r\n=RCiR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1oBHktRaCAGDt+YUF9U0r+/+sMDB1hQrZpTVtSDoXMAiEA7eBUdOJusaZGFSDJNQIANo1co/I1Rz/K1m/s/4Dc1k8="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.0.0_1620658403351_0.30188997935176554"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.0.1-rc.1":{"name":"ipfs-http-client","version":"50.0.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.4.1-rc.1+7f6faa76","ipfs-core-utils":"^0.8.1-rc.1+7f6faa76","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"7f6faa76a8b1903242f941837e2c717cd8095d10","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.0.1-rc.1","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-uOmLyrzPC4XVl7l9vHHsK1UBKko/AVBB6JwT5gSiHJDhlxMx65UOPg1fV8noisZdoGR4XNT7/KzwgNymSVJ1RQ==","shasum":"0a272a07a2289e2d260d34df0ca79331637618bb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.0.1-rc.1.tgz","fileCount":435,"unpackedSize":662873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmh+wCRA9TVsSAnZWagAAcYoP/02OZFSL1qhtxf/kivrs\nJwMBpjSBAcL1D6Dx4l5QPePHl+6UBLRbdHvEHtO5Ls1ZOWo0QokrjYO6xZnx\nimI8hyfqWI1IldxfGZHm4JFzEfpIQXcm7eQDxhgA80jMgMXkZRijZY9/RbSO\n98YJrlKadH/iMfEaIE/1Rq/A3IGmq1+VrdJXFAy7DiNhymwh8JfSd8/q7WdK\n4kOsvG3i3CNzKt17/HWp0l2lksJmKDsOoZa0CggoqxvxzcWoayd66bczL8AV\ncB81tBzSSAzYKWKp7TLLHFBIBTI2SzVjsbyvMGMxjQ4+91MaXf1SgALZzOW1\n8ZdSkWVeY+APOoX88KQpevC+OnYWT6L1w+sfnJOLpySbDImlMMnhgl68BL5N\nvGUCfJikkvsjeLKDzBghsQxT+9MOvksUjq5SuCvzuYbWCl83pv3Z+OiLrPxA\nstTPelRzXh4l5iWwpZ7GmdMZ6tf8/LlD4fMydvmF1alNMDwznpZxJ6inx7NK\ns7TmEeu0/0dsXxM2XeIz6WZzA/LU7mRrgYAM77MS0Dj+pplRfVL4ltWwBh+H\nArV0hqM8WExeEvGlBBdNBK8UZECEUXmKpCDLgSQqoxdceIcJH74cCj/CEjUf\nHtPVf40QcWQ3nhMV6hGVrrb9q7y6g26sg852fXpslESLw0TxQYhRLrorJOUt\nArqC\r\n=ZPwT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3RWV+/qR57toVHTbKL2vPR/e06JWQlBAbclg97kD3/wIgDBI3vt8YHlTI2qkWZidREusqW2alEhAX76xTEjICFXE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.0.1-rc.1_1620713391823_0.2242639435231728"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.0.1-rc.5":{"name":"ipfs-http-client","version":"50.0.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.4.1-rc.5+18faefe8","ipfs-core-utils":"^0.8.1-rc.5+18faefe8","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"18faefe8bd4ee1f671919672917b848436247138","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.0.1-rc.5","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-G9ycxoSk9NMRMFoNpnQsoe2zUnvJxYrhEI0uNvvEqFEk3PzUN91kj4vXLAfVw4eorx415X4Asqq67RRdhVlHvg==","shasum":"723a9954ef161b7e929081f5f2da233c1f135cc7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.0.1-rc.5.tgz","fileCount":435,"unpackedSize":662873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmuivCRA9TVsSAnZWagAA+VUP/03liow0pZ9E+NCrMnfL\n7q/oguaz5JRUmwbNcHZEbJpmPGtVySGqWY5sasv4lfPG1bnTiTaSfcPGSeHJ\naKXRmSpzIKPnClK77v0rtTW+X086TF4zDCOOCxtLc0fW9I87B8onxR4WPP42\nwCL9KRc+JhORKQzZZJdyPBSuGBfHRkPL1sDVQ0mriBzHUddjTNbk44HN4AW9\nMl51b+ovGiyqL8rHdVAhhOR2RDTWp0ZuRc4kuS7N12wmuU9wxuhPNWuFi7Xd\njrDaIZazUdDu2fOz70L32Eu5zezgx2wWjgvVZiHUhEVwH4wW7jQRSahKHJ8X\nzjCDgux4jZcRc47N7xlQViXi8QunkEpx1fzDnJQcaOIQBtB9BZb5GkB6grhI\nYiFPm+XHOvR93GSpjc6ewL6VeudH2lwfZQ4gMs+Vn9WcR7LQ4ifVirwvmKKy\n4u6RqmDoNks+rR8eYgo4yJu1N9DMcIGOd12QXJe6zu98Yr4g/Gy+0TkXB7Mq\n99rTrsupjQmTXJr9U33A4loRy/NwX/s03X2PaZWH+hEJQVVbco4MwQQMZ46u\noYnh0p3QJ0D24/3FNXsmNYfcSYsui1IyHhSAsXzme5WuE1fUkgTxoy8abv3B\n1cFFUcoXg6ct7QFEBesi7mYxFr1Z6w6hm0glRQiCRZRbM3ryhx+dK3eyOE7V\n9Vbz\r\n=HoKn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNBF96P6OvQsodclHX3yYNXuCmZ+SDoNN9k/9ODO6LfAiEA3E66QTMWiByMFUYOS3sK9rqId2XweekzVFL92lIOVKA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.0.1-rc.5_1620764847093_0.45967537936431313"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.0.1-rc.6":{"name":"ipfs-http-client","version":"50.0.1-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.4.1-rc.6+311ff504","ipfs-core-utils":"^0.8.1-rc.6+311ff504","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"311ff504a98ca562e738eb3bb60fddbdcb5eebf2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.0.1-rc.6","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-XXaevl3+Piwk3fEOAo+yxUoYmuFfMRbmQ6cPuncIfyLnAhnUAAGNjzlPizkYtjwMlvZGkEDJYYRXBzkJ7YX4Zg==","shasum":"9ee0a2e9238088ef4e4488afddb68d90b4029e72","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.0.1-rc.6.tgz","fileCount":435,"unpackedSize":663014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnWrECRA9TVsSAnZWagAAhxYP/ApJI9HObc0XJzbGDHCm\niOi4DPv2yBk7GYLalwwQQpxlrpbArdabO45ol7+24uUlktM10XWXMW/i//sz\n5eTUrkZjkBGkOeCMKhKS0DgB43DCTRjy+SrR4ciS8/ZBGBJ6pd9MQmUQ6CdC\nV4FSIFgaS1Nw44jiTKl+Irc6r/i73aoprI1nSmtLZUFt58z9I5quEbRPBcjt\nzCdtZq0Oimg247n5/6JexANsIK0LlDpQ6qo4+LPC5o2LBgagDv2xqbcNTkE6\nZdA5rGY8M+YgLBXug7891QdgQFZQ8oehSSAvHY65elR8lJFHtHvZIJy8EraP\n+xbYiOKN1gko3oaowuaL2WWc5juaPFztY7wPHj98jo1jbdDaYsR5qS3Afgjy\neeOBofcf4g1ZVw9jrEMni7MhSE9nMbGUzRAi8zViHPXW4WwNtsnmVvUbMo58\n8QXU05xtwYVHx269rhqenfoChqxSB4cQB64uwTCYJfZFKxtFU6Rmk3Vmjm4J\nTCliemTurknGw6CzQu0QYGcHkkSYHXU4uYuZW1q9zfJpWZX91Vt62oNmS4jR\nwwDbtDkMMzp6j4OQCI0TpIc5KdRZkj/faqNOH3WDy0nBmd3wkTB0ao35pxpq\nmgcGBDm4JvCVkdlPnxfk3R0W9IPTzRIuiAbXx3wtesSJKgohoVQqk+aQNwon\n496W\r\n=3m3k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmL/gMJBCdg82Ra3enfrBsKgF1DGIlY0pV2HcRPu5RegIgbg18WuweAOR3nyBVu++kPM1vC2mTTJoDUMe37T4uvsk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.0.1-rc.6_1620929220141_0.6201455838860843"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.0.1-rc.7":{"name":"ipfs-http-client","version":"50.0.1-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.4.1-rc.7+1926f990","ipfs-core-utils":"^0.8.1-rc.7+1926f990","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1926f9906bcff5bdc8d417a7212a9db52ace7e3a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.0.1-rc.7","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-3xQlb0hwSRfOtUrUpWxhl7TSLC+qPNhAmdSMYz2XS+MrwYxEilO7ZlKZMogTJcwh1/zCPKqkhO9kDhkHnt5VUg==","shasum":"8bfb033e288df38bd6b15e70841efd789a5dff5b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.0.1-rc.7.tgz","fileCount":435,"unpackedSize":663014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrQxQCRA9TVsSAnZWagAA1HoQAJc8749zZcA2bcTiSrU/\nZ26/oQhX3wlJDXGtgIWt41RHybrWQJT9mQ2NfkzSi/e0h8Ka5M7YviwdhBxV\nv2LR/ulC1IzbUs6uMJtlItLt3fH3yvXrgvb7weoeEl8OrJts4QYSqPouB2Sf\nDi5fRz4Kr/DCYLAcn88cgXVIoIydV20Bn9wX8VsMQquOs66Ya7B4/RT/IxrN\nA1Y/vSzZ/sQ5QIJdNwBXZfc0YpK9xFxQbxnm9SRaDS///NXPzpB2PtlJ+zrk\nuWh5k1eg1hDz+OA0iuCXYkPqcp96KWrB9wi9YapZTNKzRRMXX/EitSkHkFM+\ndtoFlfORFTKLeqQtbtaqPgHAfqU4KmrppSdhB0s/ySPv8CB9t5bLLKxL0EGL\nus9y0e8zIwS0T116T3fgshKsNEBrE+1JwRD4RalH/pujFVXz5Nqu79/4traL\nlbVSNkpnzGUTueGsMBdwDU0KRI4lFILfg58nGkHFq2zKHEbC7LvwlBffQCxt\n76/rAhVJUCgHBBFzXmHHHvSVCeaUaFi6UOLxeKOI3KWwG0yPVUgLS88pMczo\n3TxUPtQvUk/Tn8bvcPteKgaZJimaBheAwf/D8rMD/tpME8+tkLxEWQ57Ovry\n/dJYtSNDEeb/TGWiv8iPrlMLrcR3e4FIV+CM8rqPYJ7lrwTgHpnv5dECBY8g\nHEH5\r\n=R57/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7M9Cz99fVAqKqvSQ+0GKe9El57GJVcXYSckF9cKI2DgIgTdkqCXy6I+869iVONh5UGLRRVAf3zq7uS6HR2wwq8ug="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.0.1-rc.7_1621953615615_0.69398940745851"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.0.1-rc.11":{"name":"ipfs-http-client","version":"50.0.1-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.4.1-rc.11+e91a1e52","ipfs-core-utils":"^0.8.1-rc.11+e91a1e52","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"e91a1e52b86fcc9ce5ca5881e8721863b58d5d9b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.0.1-rc.11","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-GwciyMaTt7eQ7gAQwpAfOD8ILmcugYfIOCABv+KJdj7JUwOYbTQXac//Hnq7HKxD/XEZtgY/om5TBpvN8fkzbg==","shasum":"756a6f9c84c9db203987760272d32732a13748eb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.0.1-rc.11.tgz","fileCount":435,"unpackedSize":663017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrSCKCRA9TVsSAnZWagAA/ZgP/Rq2VXScvPK3GzKnyg6M\nwwfl4XkzxOrulVXsMQsu/ndjHLHdEAvwu//haI3W6guC2FchyDM82QnpoSy3\nz9OQiXziqFxGVCYNhVwKt5tCGFwtDv/XSxM6Dj3RM9ceyuSxSPY2Li1pTE/W\na58I+r/ZzESrSI2tRkdyDNgqznf8A68QFmTw1W+u5cGpX5B14Tik6n01RtIQ\nisXDADugOw2ZOuoLfzyvHLAdeVfVKgEyQ+ZVk4zJCaq5zPcGj9r2o4nq2mwq\neACXYHILRu17wSTvadn/5vY2PVKI75IRpiXozpa6OMm0aWmt2VIvmLO3bd3Q\nipTjxvVNmYlLWWBKI9AVUeDdSjFGtHfGaodbDZ2Xiarb7vY+qeTKtXs4mB67\nxgXd315/sLngEC/MY89Cgxdat1MvyYoccceTGK3NBe2GGo0Pu57uWeneZwJ5\nX6NzXbPAf/aDwqlkYRX3NpArz/416yuS1Kn87JcTiY+CK0Zj8Sx3X2dOqj0d\nyVEDfBzVdA4Z1XVbMxZsI7IKu/pXWPUZRK9D+xUtSQgVgocwbCbMdXeRrfUu\nLCSGSLAtXO+3CoSwO3chwd+eJq078lX7TFbiLrLVwAXVY7sbZujQjSINd9zV\ntYuY3wC5iUdkoQ2ZwaPdcGH6m7Fy76fJIEIABAXBK9fTQKLfQ7RYbxH9wp1J\n8lXw\r\n=nTJs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRsj36/S/76ieg1BPBewBtzpggkOUcQVH2/hJxGiMq/QIhAOufNwKFU9o8IZOD3hEla7Akaeylg5npf7+0ix0FixH/"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.0.1-rc.11_1621958793868_0.4220701391712467"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.0":{"name":"ipfs-http-client","version":"50.1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.0","ipfs-core-utils":"^0.8.1","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c40960358550b920d3291b8030715537a63c63e4","_id":"ipfs-http-client@50.1.0","_nodeVersion":"15.11.0","_npmVersion":"lerna/3.22.1/node@v15.11.0+x64 (darwin)","dist":{"integrity":"sha512-w7zWRugPR9dm4TS/rshtwycjwGZkxk9AXHV1a8OoVYZHEi5BvHD+kp5PdskfrfJ2rBtnWEo3qo2OoIpBe2rxxQ==","shasum":"5177553029a7c32f1c6be3eb1d91fab0d71ae437","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.0.tgz","fileCount":436,"unpackedSize":660377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrhXfCRA9TVsSAnZWagAAncgP/14CwMSeuWoxnY3OLhrt\nzE6AYvx/SteDZ+EPDkYSVZSC0cmzf7FXBVvOjFmQkGo7hXLurFnCRyGfk53o\nocl23KjL0ILzS2s/NH2Anz1Oo3uKfoB4/yJdaX0IN+QXJv+XY/gPU4ZbEDwY\nYj8swTWutdwkTLjASRLeg08OPlGyB0f5GxFwNFA854pgdxJ79Mhk/PCaQ7Zl\n67oFWZ4bvRlqKxh0sOfsn+IbRGLvuFtsWRXsx2wU/kpIlIbzAMR/2ii5xmZQ\n2KxnCGj5T4QAc4RdyszKqSkaD/+esmRx1R0e+hg41cXPlEVRiMW8CcpaNpE3\ngX8cx2LgoI+hACBD6hp60G7QxJDeNZ41+Y04F97/zzesMGo9vlcXnli6WS5Y\nX2WXiWDyB/0/Snr/douPwhKfd2H62sVb/J+T4Stow1sEAI9tsXVOK8gw9Sy+\nu4FE5VpazWXnVL94+N4gKTOt1MoQC4vWwg66NrYbIsmpIcxIY8TOo1HzvQZq\nCSvZZH+26diiptz+lelTZxxfB+H9dzeMTi+e6tQroASE4mw4EeU5hJngfkQg\n8Q9ZU5MfQaL8VcBk5q6J4oABjfrt+Ro+j2XityptFVwWLGDsvDAy3kBJh6EV\nmGnLAURu5WDYDM0eFThIdEfqqwI1VZ5c6/T/rK0tJu+9nrb8bfDwvFcLFuvb\nY/XS\r\n=UwMH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsDNxemXHTWeSy+H6maQrc9qkL3llxGI9b7MgAXQbHzAiAfBbGQavmrsPPfrJecAS9DwOozD6cO70qhAmKtjShI0w=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.0_1622021599316_0.22479630932689942"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.1-rc.1":{"name":"ipfs-http-client","version":"50.1.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.1-rc.1+48c4a952","ipfs-core-utils":"^0.8.2-rc.1+48c4a952","ipfs-unixfs":"^4.0.3","ipfs-utils":"^7.0.0","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"48c4a9520e4ed668f4eca2fccd67f9849e967286","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.1-rc.1","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-B3eQLWDc2T9BrnYS0D0OfWoLX9KdS+sfDRtDEMjjtKwmN/9jRr/3LzlQoISEXZSX9KvWBKp3zSBzzCiE7eISUg==","shasum":"16e1766f1a2314c78ca438a74bec8774b4d4cc74","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.1-rc.1.tgz","fileCount":435,"unpackedSize":663350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrj4nCRA9TVsSAnZWagAAxUoP+QFD3uwWhYkO27So+SE2\nBFZlLTuZvfDPGeNkyRsufPtFgtNhKSSGCod5htiyxVBjhZHhtPQFxCRwgJ2x\nSeMe6wVI9B1ofJOLpPnQHBlbMloloTzA1t/JiBDQ43adH4YBL5gGjqwfsriU\nglmjgfUrWH5ogj4SWNq7kRHOzoRgKMxFVkJnuObpfnWxhKFF4mqegtSMSy1T\naEW7TTMQXf6Wjii850BPkvng7OwCSO1Q1yYXnDlAE33C+sox1g/5BzKclpv5\nUV1UlN3rkMAFMcjZ7XtuQn3Uc89fFGGgoFbjtiggejhF0Zy9ZK4axt2jD/WC\n3z+k0+CBIl4ufPZWhoRA2EZ0tKMv69rBkiLvYg7ZshlfPyzfPDw3CLRLcDgi\n3zg4phYrofdP7azmx4nDPhHN5tWBbVP8ZwobsaEIt60o64hn2ao5hwq2Xk0U\nKz4C+uPXHOl0zb70YqflUui7IcvTpTQv3wyggFLeAgUqoKqYVfiZ1G49o0CB\nkUMIZ0Dq/fT3+Tw1SQaBwRze0ttdPy0pIZg7KrkNOXy05m9wq0Ir1GXLkv6S\ncAGkNhiqBlhWanIq9kveKSHvRlg1sCiKZpQFIbq00Qz970B/9XT1UENeNhEq\nxEqvH9iM7V9T01ftAYSpP7pgYF3ma65MmOz8V9Ch8+f3TvKAd0+hSXpkh4CK\nrdm1\r\n=xhuT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFlOtSXPiRXILiKqg4ltI/VeL/CegjfMjlSd9X76bBbAiEA1gClMq5phvhYDP35mNRha/06B8lCbJgPOq4lNo2G7yQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.1-rc.1_1622031910986_0.5898706475567173"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.1-rc.3":{"name":"ipfs-http-client","version":"50.1.1-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.1-rc.3+ff56373f","ipfs-core-utils":"^0.8.2-rc.3+ff56373f","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"ff56373f0606ef2c59a61916f02e42ff524f16ac","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.1-rc.3","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-O8/iXK008z3pme9y8dUGrH6BBmgRTwdkyvxYICxb+iNvXwjgfGOMfiA8IiLXdO3n6ym+eruMDKP3GxM/lhiJ0Q==","shasum":"0f005cdfe4563df24ab94dfb2b45fdd60f3e41fc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.1-rc.3.tgz","fileCount":435,"unpackedSize":663837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtpr9CRA9TVsSAnZWagAAtHcP/30a7VLJz/CjJn4rApdR\n5bhAD/MNA4gghv9KOnIaMwhiYdWN6s/tEyvOdk1r68Cn5KXaDkO2gpKE1e3G\nkq77amhPW0zcYwT+dXwr0yM3qGJPqODOj26fp/K9tPP8K520rcWuCAjoc4OL\nk9kttck9c/GOPx5gMTZAhrFozMeer2+CBkQB4GS2QvVJo/BACXLXPxlYBfM0\nsclEiTFng4N3Vu3e1+afY4dk8IvZvv0NDycPgllF4AAt0BYyqbnh5jFR145M\nFc9Zzm1MziP4/sgSoziBoi0eHo68lNVSubL85xVa14KRnKlJ7x6Q5mTdakuo\nnZrg37UtWFDhgo+QZBNb9F0fTPVeBgWwFOs+DKJrBpSi4SkeWKGt5zuTJDwA\nI8FUZSGKBgueQx+hV3hKuUNL+/G2Dm5WRUbaU5N/lvwiABEjeXpc9DLAQqZc\n7n/Zg7i3Yn2SzAXjz+l+4QxlCyMa0R5n2HAYbnjnMKzP/nz3KHeF9lnniQ3u\n+LLeN0vxZ0x7N+28kppZpvb5P3YicaKRjt2cf2G9NbC2GOWHAC1kzUQeCll2\n993FJkei9gqOWgQ98zdO/A+GSRvpEzbk/efcPCjS77v2zJ3aSkqLuzCVzyxi\ncW180XZKVW8sVgfk7QvCdF4PGsLHZZ1ASMYtRQXRDMxFvBc60TICIuh9GmoY\ncu+/\r\n=XaOK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRvgG5H7f/NCp4m6pZyxkApbRRv/IIAHgcJLXrnh9i+gIgcH4jJyHAr7OVq7uMeo0dFxaKDZC2Uoq1EFfVsaTY3RA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.1-rc.3_1622579965229_0.6797678951282866"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.1-rc.4":{"name":"ipfs-http-client","version":"50.1.1-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.1-rc.4+c4a1aea5","ipfs-core-utils":"^0.8.2-rc.4+c4a1aea5","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c4a1aea5addf902506e34d3d9821285ff0423710","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.1-rc.4","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-8hk4atRZHQUbb9EwE8bJrYNXP6eb5fGEyIWBdj5aZfsfWvlgLhhh3yy0dNsKp8QRN2pM/SL6RiJjWygASoyxKA==","shasum":"9233c59fb2a36f6ff4f640a985c812b8537e2acb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.1-rc.4.tgz","fileCount":439,"unpackedSize":664313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguxb6CRA9TVsSAnZWagAA48UP/AiPHjXVGncgsQqVd/8l\nwTLIUJxtRjVn3WwkAsc3WsrHHgX7BNq2Px6zGTSSfhp/ZYZzsQ1eUQOay63N\noHO1Y//iUiSIV6x6RDPVLyJfzPNptI0D0MabDFw6YQozVFVwT8jMkUfyZTwE\nlnLNKqrN3Xj5f3oKyXsFT3Dmq+TiL4z7fKq2tOOeYQj9DZxuYzADgv27eAg0\nofHTcRBBZ+3U2rY68FzLcnTIuC+kVgmwed8sZVJ5pYXvZTNACWrNXyfM9jTL\n4eAQi5XIT4UI6yDw0dTWNTer5VoYMMQt9KCUKHXB9LOP67Amyjd0H7yGN3NR\nOVJcTgGZHyrKNeX9F/lA2hs737uBbAu5enG94vpqvDuARaO5+GQ9tqYiBxL0\ns70XOgQx5O/KdbcBzYYrYtRxsfe/yN7U/DxUEULofiwJ9gOWiX4mX0Z9OFjS\ngFvom+7KJ69w8yrBBHIAIyjKJ9Di+W3+xDNcjt/1Ktk4rAJ+VdqTOKYMwEJj\nAYEo+wEpEcPVdnZszml9rFQUKkpITWHgxTwph2Hfn4ZwvMDrZIVPqqahp8Un\nvOZFDJSP+CHtMC1o/OKBUmjR5GpZdDrgL9ZycQzYLA0gtOTgSxAuO9MfaM6t\nkEAuwZrjNKzs3/LnZLI1KJewSC5AGYcmQ5Srx+qoLaswLFVCMspL4uTlnP10\n7pl3\r\n=VNFr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCs9FbwxKADPNNzOXZdswnot93lIKVBfLemK1JpQUSRLwIge2XXGSec3CfGzMfSL6M3Hc5PIOq45/GymYX/KALaf4w="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.1-rc.4_1622873849875_0.38398528591291137"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.1":{"name":"ipfs-http-client","version":"50.1.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.1","ipfs-core-utils":"^0.8.2","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"08be8beb2168f39252affc8e840ff3e185c69a44","_id":"ipfs-http-client@50.1.1","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-rKKu6a5hxtJOfNeMEUwkMzhKGe9/v/kU5CSenzuIjdyNNALvlMYdDcivsZ9X4943J8t6r21b0AdNUWVM21dBFg==","shasum":"6155e1044b393d9f35688d895ed53ade9763372c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.1.tgz","fileCount":440,"unpackedSize":662837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguxqgCRA9TVsSAnZWagAAY5UP/i9z5iMd+S7RjttDmRp8\nUkZuYFoTNpF/EqjYyGmnX4R/1i4XkHIEhdgvRxtK0AGdWx/3hnJT5K4VowRw\nTDWyX38h6ICpmTgRE+0O86PANN4NM1Uw3i0CSO/ShopUo01y1tLViaJcDF6E\nxAroW+7MPloF6tqHVBiz3oGmku03xbpN+pddNR6MGgyn3VGF081/OzWtDqdE\ncCGAloW4soodjrdb8a4sdAuULoT4FYRF6HAz16V39800nqxAkaAHKJL8B655\n9J5WPRgxuJbe80GnKkg2olQj/R4OQFGleeHIsNLreDE9ifsdw9PW+mjEFOBb\nbr0o+n5rKT+FZwVQW0lh/yQ/TBin74HTcqxrMu+kQg5+5wf+jlfnGH/9BQ2w\nKgwvv4n4bIooajQJIGUrYmSho7JcieJZ/gZp6cKLF26Vb7KvpnrNAzLS1DLG\n2smEMr3KaPAWUOodNJxA51cjAVJ2zkytrzY6nvuwU+pJcSDRPObtMEa4Um70\nW5yOBKS/Dg0SGzdEygroZQPNKFnxr0PxVgRDHNFaOZT/IlD/aX6OTrSWVtWa\nIg3w6fpKfijoOIcDrt5xRfRMFV5KzRS80xCZSteXGar4LYKdbS5pO24Ksieh\nm6LbwnjAo3PvN1HCbghkujDvfiQsVdeSWzJe3Anp/r953G38dmGuY78MbJ82\n6Qdp\r\n=2kaO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFaLZ2VZ8ljqZPU13FeoT4y2LP759wt6OfdzND1eBXXQAiEAqubPY0Fco5Wj7EhUcN9zQZRHvO9lpMFfbFlu9VKAHGg="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.1_1622874784753_0.24229953608684762"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.2-rc.1":{"name":"ipfs-http-client","version":"50.1.2-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.2-rc.1+714c3de1","ipfs-core-utils":"^0.8.3-rc.1+714c3de1","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"714c3de17f4833b8dcb7c0ff51536661a22cd6e9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.2-rc.1","_nodeVersion":"14.17.0","_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-Neq66CULWGW22TmFWER0sWoB23s54r7haeTTYTEPrzweLoUEBMHnrQSDdtdbBFqLeygoj52fvlS55eq6LNmlsg==","shasum":"00f8e3698f72ac7d01fa657a96ccba9bc4215b4b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2-rc.1.tgz","fileCount":439,"unpackedSize":664978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwdraCRA9TVsSAnZWagAA8fYQAIn7ScV+WV9eAzytI5g6\nYN4QipBMb0uVNfH7svF49ZuFW/TULCkQjUn9WwcITX3PGO6NcLIesPafFV+a\n8Qmkg/A4lyqAOVdzSPnljH7XoumLq9TROxEykUgj2Zunm9get8VN9GkMrsdz\ney2r2GbeWyGcUsw+Z1eytGIJs/tkeB7zoqTT33f3o1W5jepFad0WnPRpJzrG\njkZw1nk1SqLLvjgoGTaPX1vesy07Uir4QkdRndhaC+2tlY75PttqNmqKU8aO\nL60VwkTonyQuFyTUOFV/TX1dbzJb+ZOl2XKGKmQlva9Naee31NVKR+1+QSMY\nWW/AttOrRAEp9szXwRIBKKo8wh/atHlX6R/XIURSERAFL3+6Ad02hLwyUEfF\nknlxOHksz+eFe0D6EIJ+sbvL1KPV6ZztNh7cNn5YMhfW8joCkS+8XmDxlX7g\nfOSk9FpRS21CY3wf1sTg9Ts3d+3OkD/q+vWwaeQhaiVtUjNVWxw62rkRFTDd\nKgDc/hFYOdtPc0csFAncA5G76wbqNMDNjYqtIh6EUB5wjRIR1eKeoHq6eJz3\nk8devxAiY2H3z3o+7m1eY4eRdhA7bfAUmBJpL4LLbIkXLkDxP5c3m8DgI+Gi\nPb6n05XVD22Fxd7QWfNrnmDgyRjgRk+0ElagZ2jPB8gB9e1GyPQa/9n8CTva\nwipf\r\n=y9/3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5WoaTsu9HC6PmV0C8KV28RLE+C8WHwBhBVbEXrLFR4gIgMNegyU3dcfLN/MzsB0NZNBu7hC10yQQBDMB617z4mj8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.2-rc.1_1623317210520_0.7307297908082566"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.2-rc.2":{"name":"ipfs-http-client","version":"50.1.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.2-rc.2+bf44a037","ipfs-core-utils":"^0.8.3-rc.2+bf44a037","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"bf44a0371a53325a8ed10c93ffd3514b995185d4","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.2-rc.2","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-pvCfw+VT4YOEBwLMswgMDbvr4MqgKabUK0CRXwBnYXXdkQMBDnQSoyProMG6bxsy1fc6kfvivfCxCa27s/lpiw==","shasum":"9d2724bf9f3a821f58dbd66ca2a5c2be32015461","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2-rc.2.tgz","fileCount":439,"unpackedSize":664997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyNoLCRA9TVsSAnZWagAAFoQP/19pbb9aEPxaItSZNfSY\niusLtkDOi2LMFMD3PAXIz35OgMm5abJ7hQwMUjDuHqcIK8qlZjz636P7N0Ek\nGrzCHaoqPbcoi80hqqRrYuswbGZy5wm29xY4bJ5qw9VS6guYWYqM1BOH+0S/\n+EZY5ORTSeUP/RlxZulvCIPxEIxdUT2OzhEqmVzE8thnVwKXT9ZPT81jgO/t\ndQZMTVSb0LEeglJAyTWZDa+oNq+ASz2WNHCULFjNGQ2WIG7ucmZKVn9jomkI\nMfCh7z1U/vUC5B1KpI2uczpdec5i2HWHx6qHMHtioBXqFqc9qeJE/vMMo1ki\nMw42OQ2rOR/LOQt+tz2cPRCJbJPSMimCprpIpzeKAMm7TiNPAG2+y0U+C1bt\n3YvVHVx+GPE7HyITb9i0EaZ51mB3B3UIWBNTyEXTbAhBBsJoZJLT3NELbZv8\nn6AhCjTmpSMK5EPDAbEui5cZekfVaEt3ZoFAcudcVfBapyxoMEptAsPAxJje\n+f1zj6/BLJXUb5SnRvoRcN8pTFr9y2/dlmpQkvhdVIiUj4AlUvC+DGA7COuM\nMa29KRSo6XXQ/aLrLTSQ+oEzeV1tkejAziCyfc2kURdjqVj5cokVXwfrwQgO\nZBetNBVUCWW5SQURgCvlH6NIh20zYnLHH5Tju0ERd/1gIKdOTMI33YOLiRf5\n9xHb\r\n=W2B7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYjLxVBVWxjrw2MNjguyS0MUPDZ90wswnFeqd3BwnaJAiEAvupUcjNfr4i0SevZ/THFg62lcKJBw2yVj/CzI3UX99w="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.2-rc.2_1623775755180_0.8343020952499665"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.2-rc.3":{"name":"ipfs-http-client","version":"50.1.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.2-rc.3+b1bbf5f0","ipfs-core-utils":"^0.8.3-rc.3+b1bbf5f0","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b1bbf5f004fde7a26f8cbf6e0bd7356f07dddc94","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.2-rc.3","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-ifyUU+2xODQrdLpHSKwIeB/NPwjq+dF7F6EUc1806uA3+Z24t6uQ+2X37cNIMF0FvVUKWm7V1a+OAHQ1Y8k/Kw==","shasum":"5d378fc90b2bbde5c0193b81ad7d6985f4ce4eb8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2-rc.3.tgz","fileCount":439,"unpackedSize":664997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzFU2CRA9TVsSAnZWagAA18oP/03Br129EEr/0v928zBn\n0WqZNhcajUB8eTbvMyF89sIf92SmB99ZteBq0gRLkW78BmiRkcSwIC3g5HIT\nm+R1nS27TYJC8pbWlQi7b+5E8JctRg7r1BPH/RifP1aoGA7E8MZzYRr2WtMS\nRJyfd+5FCkqFNumPkGzgTRBSRR86BNI0ICA8RE/ZJoIGFNLpTwjziMAepDFl\nkDhWQ/aVN3/dHwAnPrF2ntygiq6iDDmLT0U6AvkD0AdSmI7AyFyP2tRMneOZ\nguWkhhQ/pPZzAsec+vxe8OeSkKe3RSDJT/PC0FoJ9Q5470RHm1xBjFarKAsx\nZkcetWfr8bo2+ZQg6h5gPCBI8dlKKxI09/UUxR3ccA/8x5BPiLk/rd9I2Mdd\n5hOWwa9BX3fQIBsXEfOCslBXq6U7p8asfsr1A3tecTBoI3vQu4TvY/1Jq1RH\nR/EpeiISL7AlVAdQUVya4il5WdJyfhAxifUJH2NTdJiN1cY6o+/fueOar+D6\nOK3KJ3++y8y3jWeE8NkP3caueUeOVal64xAzgWNrFJ4WZ0uHmm4eB5PIVLgX\nGIhAUHYD/CdRBUcYYRcN8rl60sVxsvr2vos4eoWS/m/6iJPUKdgjZRzwdX/v\nxiZKdaM/HlD5ohp439T3cQzv4dihw1wZlOmlglUwaisa/PK5FBQvSzRSB0EB\nYxQ4\r\n=yBfz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCr37Bqsx1B/hQmS2LjsRisuvAICbtXIQxRbX2ykDhD+AIhAIuPbIkm3UbQf4BicSzrDF9bzm/a7X4AJKXub2Gjx/pX"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.2-rc.3_1624003893919_0.02634713671078215"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.2-rc.4":{"name":"ipfs-http-client","version":"50.1.2-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.2-rc.4+7c1afbdf","ipfs-core-utils":"^0.8.3-rc.4+7c1afbdf","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"7c1afbdfafcfb81f698cea35cfa0e392711d40a8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.2-rc.4","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-Rl06nxNwzXOkZmrKjG8mHI90aCqvW934NjXOVN2fTp7H0u+58l0EAlC1J0fP9z0nARGJcDRKg708LSBalEn+2g==","shasum":"858ac4e195bfb84211ba3ba41284bdce6822d79b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2-rc.4.tgz","fileCount":439,"unpackedSize":665167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzGWJCRA9TVsSAnZWagAAbYsP+QBr2iWaYD2yyBViUPHo\n3btRiIwM5h/ebc8ly6PiikLG8tMsmSyOQk94OE+hQKI+Dmsu2pOfck5t7RSV\nUBKwlcUaElSHxK+wypt4ysTPbZdgWfwpkmf1fHAEJO8JiFmea6jbLFOqNE6t\n48Gt8wpdYsGm5+H1JBrdxA1WtqFbWxuNqTG2fgfLO3xTL86RKRw+LrEnOjMT\nc9U3wp40JjePrE7SOYgukP+4Qjz9TZHKlH9dMphafnElkhZD4gyxxpFujSiG\nYUAiz/iMGYfNHeLPppaFLcvY59OyBT8ryLqZdrMCA/FSlEqBgmtBNmYR2SEG\nbhSSeftwXGf11KwGpdHo+DMsZ3ssPqXY4hoda4tuGPx6oKOZBhv0B0iENzsl\nRtrmUWBe8zsd6gZWcehympeHstK8CP9u/kgkTwB2zuxikLHOZDq0XrVAZFrk\n47VNrMS4Iw72dq//x+NHhN1DXK6YS9CG3EsZ5evCopkVBbO/o25b4J4/uJWG\nRSVhxOTQfTYSPCIU/oZ4AJKoi+6ouQSs78HnFLjPys+wwtnWy79NOIvBz1Ql\n8bSEwuDMsUwb8nbPQceC0IYo1twfcSvqHPWpAEIXfGrroTJU1dAgK+mx1HmL\npq0burwoZmk3hpvRWqA8txSqSx8vIgmyG4NZcPmdigykcxbSl7QdQNVrwz5h\nZc17\r\n=dZrF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0hyQF72+FvUwagkf4VABz5aPR11L3US38UrcZadfIiAIgLruHYJdaWX5kcQx/+SRlI3ws2HQKsj73tqVEY2Me9Y8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.2-rc.4_1624008073095_0.5997642970668133"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.2":{"name":"ipfs-http-client","version":"50.1.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.2","ipfs-core-utils":"^0.8.3","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"81f944163f5a78ef15fdc23b2c488ba7f44af0be","_id":"ipfs-http-client@50.1.2","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-ZbJlED4wqwFXQFVB9FQDs20ygdq7O/zSq4AvO9KRAmkqUj2TsCWCteUz2fBMnGWLh2tExxeSl/rQbHbJptb8JQ==","shasum":"31b60f4bd301b2addbc6fd1288f5f973d57afc2a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.2.tgz","fileCount":440,"unpackedSize":671384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzIB8CRA9TVsSAnZWagAAJSQQAJbpTw4goYG19/uRPOXz\nNUAxCu7a6CnRL+fnhyDwbPQMyZSeFEtweyxtO+eh4S2NlYnU0mSUxPH3hav5\nlTzBTBvGH8oJcxMRMIgZCFi/WYqVM9ot43adY2eU7WEfsA2ow3wygLgaB06Y\ny0uITuTiGJQdFbuA3NIu1jshuQC99ngyo+eJq1nycjs09Xz0Xx9O84aKNLVb\ngeKW0PJFf8UcnPl0dhuuKFdA4Z0XFYiW1ybatD5bL+3TvppVsKz25nl2I7K0\n4g1UB94YLDn3aUj/OoUe7F6B2i0TQJVRS4DQrbrLuxNgy6tEybDmrxay5i3/\nRyzroHYbuZ5/zu+fnAAhOKSBXzilrbjbCe4qAfufRffLfech8gfOc/XXOuzO\nJT/5W8vG9TZwcR4cNkpF2CWD4Sg9hRUvM5WrwP3CLNZmo46uHm57qiqu5i5P\nhehuC9QRmCW/+qWnas7BWxiob+RFcExp++dlodMgK2dGOHANIlz2Ss1XSR1w\nTN53j+b6klWnJyhKIHHtBXaM28JcwHJjKKOxhTSvkMPVLA0lk3lJmpa14xAb\nJv4q3s1QXbsCDOboiRkVAyJs5dJ/wznpqgrKWtkxumDzYSzjg9jA1O+Xbw0G\nxaQx+09epLASEVIcpjLjfK9ZHDVV1KeYX9VWBU+A26yOcufd6RNHtNcNS06H\nkGLe\r\n=GXJm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsOZPKR2p/czwAz+ydVzEu2JAcfhjzKn8GmaCSE8TeZAiBm/w7JpzIVcd2PumuxHekwApWvoo55/N1xoWW45QYnEA=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.2_1624014972035_0.25919673327258463"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.1":{"name":"ipfs-http-client","version":"50.1.3-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.1+f4b2a8c2","ipfs-core-utils":"^0.8.4-rc.1+f4b2a8c2","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"f4b2a8c204271922ea34ef8c060592eb56a2a1bd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.1","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-hLxMLOzSxBdr0uP860OpDjDUACVKe7MhzxT643qU4dyo9h9hU2R7TR+ibrl8GhkVPhdr6mYGtgOLrHyFQc+Yvw==","shasum":"01b63e08d6cc22c01f9fa375d12f3e81770cb643","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.1.tgz","fileCount":439,"unpackedSize":665346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzMKVCRA9TVsSAnZWagAAbcsP/17y6D7adcR1p0ob+9kL\nPVIO2ROrjBEK72umDPgBNY9RAalRoUnlX0rHZZrh/OR0mCco/gftMLG5TTUW\nw0fmR4vIZ+X03SzzbvGnmdVOPrCqfWfzdgo7YgTwWMUctT6uzmucMbf+/gcN\nWLmssJqdV/IF+lcO0ZBUijCiVLTWaIT5HAVkdn7ekXs4HKqbUrEy5YaAju0p\nZ9nBqZ/ce6YIuhQVowNWfq6uvdbrg7ZZ4wHv/UA5SwVSMFS1wid0D0QqXUkT\nOeyQQjxj1C01dmQA1hOqeh0NENzyRnwvokKO9BcEQBZ1Tcq+Zxf9qAg/muip\nXY+iygekgVVjnIO3G1t0IJNBn+joDa38T0Kh/HOv6On4fndCq9wEPKgRWZ8t\ncfoDTOEhDzFYFdVn0yo9uDIH9KEcnTHzwWWZMe7H0fnAeviSZjV8SEHOnpEY\nTfgdHnW6vuJ9kgGzX/Pm4gGrcBcixWN1lC1/DWjkNHvr1rsXJ6n1Qq3nyhaU\nAJRQLnBhDNvN1A/Y/VuFUOfSamdSXHuZi2DBYpbnIsN+/FIdOzWa77JdVznB\nfYI8fFl5uk7JYDCpTi94rySSQdE82LWPh4w/RL8iID61pr9AENTEl6w+N6yQ\nqdZb1muLEP+gtPUdcPKPZmSNdXpfWCg4x0AjvN1sP5jHS+In/Gbi1MilIIil\nO0i6\r\n=xJd6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGVFTMnI1MTTX73L7m404ReaRq5z/7Muoh/xVZOGQFFWAiA5AS178t/9TiRqnyw/lMPq9/cID3xJhdiPq4XyVfTeyg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.1_1624031893396_0.4262984793885789"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.2":{"name":"ipfs-http-client","version":"50.1.3-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.2+4a4a360f","ipfs-core-utils":"^0.8.4-rc.2+4a4a360f","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4a4a360fbd368b8b27653a81c9301820c93d91bb","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.2","_nodeVersion":"14.17.1","_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","dist":{"integrity":"sha512-nA6uHQWuGlYSA7/ue5KbVn3dsSFUuKv3Gu9GA1nZnDzj3S5TZA+lnI5JuOxth+T3/gNcZATC159GLxhUMQG8SQ==","shasum":"e27dbb6cd8efacbdfabdb247c0558f8631ec4bc2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.2.tgz","fileCount":439,"unpackedSize":665380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1fK7CRA9TVsSAnZWagAAqPkP/3kpJ7msIrfdtU0/ozLg\nFICTH8RzWoi1UG/kHgfxeTEal+9rTpoIcAt8ydyHlWs7LgS+pltsjcyftcQV\nMmross6LqNB43JXhSvLKFb0G52g75/cBWg6nVc6s03jqOa3JKUiehY0SzM9J\nufmgCv3ra3w7phN7CsBO2lUkEEAFXiw12PvERp2E8zeEKSnKijWAgK2NjrKr\nPW0VH65oakohq1gvlzi/4IXHHI/BhbSPyFD99aphK/Rn1yJxAVgGzUX4fZvL\nfLsr1J5w/htsORob+Sosdut6NA+q5C6GFqvvHDkgRSj7RN2YSe6PUDaEnW/F\nVvUkXYv/EPRDpKJXSN0e3Ub2Rrhxe2E66ZDSHHcoR0x2iNlaxI4PMD2b6CXl\nfwsh3L8EPTndhAssR3bPzleu65L0wk6GXelP0ptPZ9wIQwVZaxOzCO50Dd+o\nnNROkKcSRE/G8PIAcTgRddXq3r6Rnp3PPHF/5XR09qVHtYbOjB34PkUa2Of9\nDQZ0zOg0Omj60orypj89oHB6UTwIxLi3qPAi6BBUds8YZwWG0AIRmMAVhzIB\nMYfyDHVAjb9DYCuix0wTn5yNq+2R+LDeExI9x2zgZkmv40Yj2T33V2Vp2MKb\n/gqWMkTyYL0XjFjjpHw3cj/e7LkU554c7V5ndCDcXRqtMTL5YihIwuAh3PLX\nh9Wn\r\n=V2RO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3sJsBOeE4MygtTdyhmZ6iLH1MK0F/aOstkR6IdH9T5AiEAwBoQW+2APTGAjWehunwUhaobILfkLsg0bHKy5acNZRE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.2_1624634042490_0.5301248596415282"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.3":{"name":"ipfs-http-client","version":"50.1.3-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld"},"dependencies":{"abort-controller":"^3.0.0","any-signal":"^2.1.2","cids":"^1.1.6","debug":"^4.1.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.3+88dee13a","ipfs-core-utils":"^0.8.4-rc.3+88dee13a","ipfs-unixfs":"^4.0.3","ipfs-utils":"^8.1.2","ipld-block":"^0.11.0","ipld-dag-cbor":"^1.0.0","ipld-dag-pb":"^0.22.1","ipld-raw":"^7.0.0","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^9.0.1","multibase":"^4.0.2","multicodec":"^3.0.1","multihashes":"^4.0.2","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.3"},"devDependencies":{"aegir":"^33.0.0","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^8.0.1","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"88dee13a9246d841648d31edf0db62e4a4f859fc","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.3","_nodeVersion":"14.17.2","_npmVersion":"lerna/3.22.1/node@v14.17.2+x64 (linux)","dist":{"integrity":"sha512-SG4OhU+VA9dLD+sec5TI/iHpJK0kA5N5L0/98+xRcD6v2nzuT6UaiQ4IvHTFOKGXBeySBwEMCrFKAhSu/b2Myg==","shasum":"41895390b749f3f2a6edd0d1f95ae22e2ba53d4d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.3.tgz","fileCount":439,"unpackedSize":665380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3efkCRA9TVsSAnZWagAAKRgP/1VBn0AjeJJgTLZQNqBY\n2RrvnW4MROoD/COBMdArfopwadXJ5/K6h6DcDCEADD0+/wb62Ew9GFXq5E8i\nroMkPwkSIfDEmQ+lwXTFMPm9jIJYjhhraHbjhXjgzHddNOruBm0mDyfdLWv4\nYHj+KePPp7EMIpohm7/7x9RzTwla8yJ9DdOwuA3uCLAWFeGHk+oERpCYKGnD\njijGYr8XREq0sQkqN21DQwLTU+wW/C80/AYjONtYALnYNEpE5ptdGPchW7ey\n948j7ZcOiyRQvY68A1W0RAJ0Pktrq5orqdjLq61KGYmVtIRJeoao8puHJrJR\nbXlWV7bsl9uvFrqjpsw+ZSBxRen/faIW2SQ6q4mpSSHtKbHZTI5EZfflHBNk\nWpASyw+fWyWwCyz5IT2pJ4a7U8Sy3aN952bJOSiaho1eD+3xHdBQoIuUQUzJ\nBcC9BpDueKOFJ5rvKYb4iV8WgECrqW95T2+cgWVH45yFFB+GOKzwHdkPMD+O\nPVNZwH3inU57yVOCIEMy5ftntcZP20JSdzVIoCtKvdq/DnHcjZpxqvUruPHm\n1ogl67tJRLgzNaae1CqipQmnBXwL7pZbkGw+tcF1FAfDGHq5JPxxk3AGT/Ai\nyXXWmt5+l5ZeI1bMT0nkbe1ELrbSlJk4kQrZcyq6Zxju4muOLYAY5nUYswTU\nRjO6\r\n=tVzf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQConLGwHp95lSJoMBn9KPS8OzD2LghU0tB0Zof3ZrZHiQIhAKmf/I2BuI6xRa4dM9KYs74cGwuWGCky7REcpIIR83hu"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.3_1625155555619_0.9963231211310986"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.6":{"name":"ipfs-http-client","version":"50.1.3-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.6+4155de5f","ipfs-core-utils":"^0.8.4-rc.6+4155de5f","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4155de5f78134a6cbbaa4551d1b35e8e44b580e8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.6","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-2H/4ST0dWgLZAPYG9XjS1+dFAHB2JF+k2ah6crMSQmTVVUzZc+9fYQZuRpUbH5+PyCUNJB6efPbRZERFLrPM3Q==","shasum":"afd96c7a85c2b0e15c1ae1f080708287fa62426e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.6.tgz","fileCount":439,"unpackedSize":592798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9ZraCRA9TVsSAnZWagAATfsQAJJ9T/SwMMUnCwKLYATs\nN9hGCUJwycK5yQoCnJ8X+/defZEFceKxMSlR0R6lDVPG3ihPNU3q0V8Gm6o7\n+GdAJkZnoHcPuN84IjXlF5aHRMiKwjOBnKD2TuSsVlr9ydwW4Mujyn29LN8d\n9WQ95DSBD3nkz6MVijUGt+NPpoQJTa2akAdp7Xn6uA8r/U/P+jdlz84zryV2\n9QrIwNAKsaiH5ik5H8DU+OUD+nJsUX3CLIHfTU309Ap3UfRZyOFhAU7tkvD0\n2y6Aan6T6fMD721BHCILwsRcmWsjJF1RPexeFLuehcZYq9RmpLcagsqU5FSq\nuQkbuNtPwK78MckLATs8nd1De8nn+W8Gi0ueXevwSk8cUrbor8RIsvWatLmf\niZPZZe9mVQmpUOAYU6wUvTQGV1MQQ4cq1Sb5nS+m1Fwo7QHzRJvT62bSl3oZ\nmQI0YYuy3QZRehsGnmL4QuNG7K2otpfonhBxb+mt4n+e7g9cThYKC6hClsZ1\n83dRHau2ngPI579yu1qSkSy6wGEiLwscIsqkmKClLyxbJDv4bUmP8W3Da2z9\n827XFPt61TECixqvcZFPRv0Zqym+5NskgLl+H8Z3kkPE5Z1LPDi53pSKNxBF\nklVyoiDAEqGYdROa/mqwGFout/UPEjF1KnTHUU0xKtG4dlXEXEde4lh5dkOT\n+0zQ\r\n=PwvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPNaXFYRuQcxIeyNXg/7QIB+KZChS1VORkw45Q+ylxgwIhALr61hUuCvDjmRIAU2jewXCuHaYy8zqfasoZY94bcQC1"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.6_1626708698429_0.12992980073812532"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.8":{"name":"ipfs-http-client","version":"50.1.3-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.8+50361a7c","ipfs-core-utils":"^0.8.4-rc.8+50361a7c","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"50361a7c0ea69489bb24f6922319601e3fd919ff","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.8","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-pZgkayQE4RHqs1oSeENfR1eMYH3/9vUqRu2xTximf96AiKbr8BW+K19EAZdBWRi47d9BZfQVjVTllHmfT/uwtg==","shasum":"ef4c78d8d2deaaca56432e64401a851548506e6c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.8.tgz","fileCount":445,"unpackedSize":597797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/9HlCRA9TVsSAnZWagAAgFwP+gI/cDG03jJDjUwx6Kk5\nB9/npxFxTmesL8+tGr9AieZLefI0hvAJNpv8oqXoxS1haj1k5dpMj822ffGg\nRMJO/3tG2V/PTZkHI8WLSQ9ANIhctY2yU/nwMeuQD3gP2rrhn0N9kaIX93fT\nFRrZ5+nksFKYj3Ao/aoD32+S7umousmxizNW+lKKqRjlo4h6WKDjEHpvqR82\nHaWAQrLgj6yeJmhDqH2lEBxVtx3oQgK20G/g5kMFPaOdCTmah4hjEnX/fNX/\nbrAvf0s133CJz4h9brZ0mzJfJ8svxxELyM9khS6qylZhhnljTnQCb4lwWtxU\nWiiZl9XAbGI34fm7+buQtN1ecSje/NTT34mHYBoWLAXXV5u2FI4d00M1YiKx\nGx34seywY3HjH9cniMY4DEH9aCZyUmhBIyFnQIDX08C7ZXYSNjE3QK51vCrR\ne/hQEO0hlO8uxZYG+cP5R1VHuri4dnmlBTN2rwuzGvDXjj3KKPcGi+CdCfaU\ndxOqBOV1PBPRowWKiE5Tn0NU9b6JMvO9a1xVwsNfY/IFW6JkV9keb8H1608n\nBRbxcNGCooU7VwpY8yP4i7PSozkyzL9uNMVkK9ohnHhSg+wgZxDyFV0qL3He\npAlUec1VccGhscnV73A6i04L0L9Mui+yWgL2UWhJYXBftBWnKpm/u5Yi7kmQ\nZ9un\r\n=8+CK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIp2jeasX7HjUrBJw+W6L+UumC6u4sHRvvYWyPehL1AAIgCDkbJ0aSCK+uX3TL82Lc4/s3pmxJQkWVHUu85O8UNBE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.8_1627378149411_0.5278273364353694"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.9":{"name":"ipfs-http-client","version":"50.1.3-rc.9","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.9+09dd763d","ipfs-core-utils":"^0.8.4-rc.9+09dd763d","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"09dd763dcedbdbc52c590150bf9788c3f17074e5","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.9","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-/hVZR9Ch8HlI8MFyxGD8u3UTyhB6GAOi4EcmVLCrD3Px2moICBu1a4Jr7ZYjf/RtKu39kdUIukVIewWl7fk4xg==","shasum":"d687265ef4bb7d8c95999df5af89fed863ed7b11","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.9.tgz","fileCount":445,"unpackedSize":597797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/9l0CRA9TVsSAnZWagAAhBoP+wVLg9YGlqmFrrc6Qgwc\n316ov/uLnjC9JabT1hVR6fFk+gbozcOhC0VLK3zaO5UJ2M/AXoMEkfG/0sG/\nyIIUP1Wv0SItNhR+jvDoomN/n/3ZRHChsGjpEfCtBoZ+BjeslzeqWa5qA2NE\nOJqVJM7VPgT1Nlskd7wNBteGtW2FRUrPKksKGqduwkBRqfMp5TkFCjRma5Ig\n46Zy1gRaqTSLPDj1FspI2XS+iCjOTZhhA2a1jN8I3wOLTJdWxIZ5jpJW0QAs\nUlnjEPyY0b55HtWQZ7+gwmZrmdRJcKDn/5VgBTgGHRmMib40b8jmHL6pnAZX\nWWuQuuOyhfUU+FbKHeZ7TyalskNhajkY9JmkAQQgmkMNFjlyou2m02Ixg9x+\nfNIennWqpnL2f+Q+zBdiitepIDLw8Hbn+CCYmNlcAuK/3FTVfa3UAytTfwtA\n7gnrQ5bU5jlx3AkVEi7ascSkNRadKjPkQsb/xbO1HN35kisQk1co9uV9Pd/m\nw8ARi76BK+S8neEhkmyM1cEV4Jh9d3QrEaS67KU3fNOym7gF8FNSTO1elHJ5\nFkSQcd8XN+7OcR4VqThH/6a51CEV8PKahNBdvuUZuUnMQKim4LNex9CZRIzP\n9FSE7rDYUvC9GJjGc+NzdBfnQKwy2gr1WoNInEEAhs2gIz1DA/t07/wmJFuJ\nCuVi\r\n=tggS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETdnLWB41PRmgEVMuGVqay1ePxFoGmYU7aAmD1d3eGLAiEAs2++oag5W4B6BULSq43Az2o0VRKlcxoglYPR3eo/OCM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.9_1627380084492_0.8239343837265316"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.11":{"name":"ipfs-http-client","version":"50.1.3-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.11+32f3424f","ipfs-core-utils":"^0.8.4-rc.11+32f3424f","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"32f3424f86c9c7bc28155dbacb12edd97d9b84e5","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.11","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-kzgCsXqMWJ7PhUgb+heeS8nVTpcW4jRrKuYFmc6oIit4ParQsokWg14q/0iReF2j+H/e77riLg9t3f6Tpem6Zg==","shasum":"0dcb5d086c5d3c3578a3066a08ad2dae21d05100","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.11.tgz","fileCount":445,"unpackedSize":597839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/+JMCRA9TVsSAnZWagAAZzQP/iXTJFAv/n6cUJyd68of\nszRSu3RZ9Tkxv5cabAp8Em9yNerQQCe/CGIIWenpKGr6dktZoqU8KV2ASZj3\nWZsUjgmB8ZggqHh6nP1xIq8iyea6P1NKzAf7yTWiI48wr3Pjzgf9FecDvk1b\nyzQKX4QjBiyjFy5Q+vh9XBiJnhsnoc1E2nEsDpetjvk3rY178whfeDzlXvYL\ncEbiXTiS2w1PyW5yXGTTGZGXySsaGDiTM8GkOd3bzcwDQGrpy1Tp7pbmSNNn\nfq2igtRVlBAasNvIXOHn5ZuMoPy6YYtr0HmVgt/QhpvzdwIUqtkeaICNOwtV\nLlYG+k9SKxO+owZaZrswew2Vf8FBjVISU3JltFicIJQjU6tm6pMhGWKPotSZ\nCCaTassXDU5yqoBxnD24KEZO+8SEMD7D2yRwKRrpbt961y4SbuP5aeSeb5+G\n1ZQN4iafRIFbB0OvxpEEZfuc/4GgisrS78mHIBG8Fy+CMp8g8OLiiuRYTrn+\nDfPM/EyX+8/svOulYvV2iHWbtSd3KQf4Szt3TbfKqcHGjc6+eAZPlE0x/Rsa\n0SnspJebBAmXdq9JRjsigDZ9p6AqpOLIsZ/1oWO3yPwqiHHHnzOI2lwIZaeW\ntysoHa2F0UZ/6Y/Cm44txrNchS/W8zy8m/dgZOX2kp3T4SvrCN5HaOvBFS3T\njFAR\r\n=16dl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS0kLXRGd9smLuyvoulkqqeyU4t5UAP6h25k++KCAIMAIgB4s8y6XM0guwtnUKG0FV+H+jjGmTPk6K1OwQO81UC2s="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.11_1627382347957_0.7344606099884652"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.14":{"name":"ipfs-http-client","version":"50.1.3-rc.14","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.14+71bb03c0","ipfs-core-utils":"^0.8.4-rc.14+71bb03c0","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"71bb03c0a3d5e64a1ba617341cd706c83a7346fd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.14","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-hnbC+fwBN5VcWz9N9Ue3A4heaCdysibtIu1LeW+Kt0AyQSvlHnj+bRRVq1FCvXsD+9IXZNcZSs3fiLssBfet5Q==","shasum":"5b126f6391e937eefe6da7972cb7cf2153c875e7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.14.tgz","fileCount":445,"unpackedSize":597839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg//oCCRA9TVsSAnZWagAA0W0P/RUiOEYugnM6/Lb17EIj\noCz9QZZ7Et5l6u1gwIMkzsPeGlFRAglSGSbWfUQV+Ytd3JaDwhyqYuugG2Wf\nGsu+RiZaiZuG77oN11nKcBOWJbHci+DRkitpGZ3Uda8DC3L2WBhSwZbNSMQr\nkjmJogPiZsn/oZH0W0CvfVIV/iKidN1zvaUerKLJaqKpkKLhYFlQFXGgpwWM\nKz01AAGu6nsSiHLkW+QV4NIKa7j/v9fBs9njTHOpMc3gNAVn/AD3BaJLfvoz\n5UVyOcP7yYfhIz7Cs46wABERJnXUCOywUP6XlR4RBw0N04ZHOj4r2rTqz1z4\nHiieEOn65fk4PPhkmnOecw9PXc+ItEmil2fLBQaz/lGn7CNXL1zQzv/dEEDd\nC3VlUfsURd8tExCa5mqLTXLcMggUrOK/Tv9Sm/RkFBCAJjyUe2ruC9w5StIn\ns2k3M/FQpkJ5cvYGySU2BKF+JzpyQyIyQij9j6r+hcED5FVlq/mXAwDGPxp4\nv3o51wH6OOxs0RNdMERd/tWI/ulYkyhy6eNt5M8DrXFostTpTBbrf4MWZnVt\nnHvU3uv/GtLVXITA1hqlJy3VPRm/sP3W0zTd4RpiWtDOvDLpl7KKVYEoBCBm\nIMQRQ1ghp90uzCZyrlC40b6Z0eIRpr7n5cf/GZyiW2HUVU1iZXkyjXu2qXgo\nReN9\r\n=+k9o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCU7t8Ho/+hK+Q4Vw7s1ULM+tq2Z9BC+1TjGffAA/8c/wIgJmxrk7Td2LcJ1BYGGVeaqjT/UMkqXfjMbsHYBcqUGK8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.14_1627388418600_0.8635025362078339"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"50.1.3-rc.17":{"name":"ipfs-http-client","version":"50.1.3-rc.17","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.5.3-rc.17+3aa4afb3","ipfs-core-utils":"^0.8.4-rc.17+3aa4afb3","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3aa4afb30b2dc88a8b3cc2442336fd2583e2b867","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@50.1.3-rc.17","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-KZkbBio1LEa4tShfsgEf0uhktHGX61c1r/FmHB64SSIYajV9+nEhwLG4vdsqCWRAKLmSofMnXYfHDSoS903vPQ==","shasum":"ebd10b21e460e4c18750d634c7a2c393cb417674","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-50.1.3-rc.17.tgz","fileCount":445,"unpackedSize":598246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhABb5CRA9TVsSAnZWagAAIeMP/1s3hzOYlDm/ZM1pZBQw\nw4wRKGf0h8txjiW0Ezwrga5sFxHT6XJNOxDmILSErPot9IzFfHPJC5cajFaX\nEWXEf09lyVR337xILy1syHrEshnRTykrs0wkC2q7LwH36eM8P6Q+GiEUdh/H\nv/N+LVxrrMXRl0GKgcFm0vcztxw0lPljY/S5hYOSU9Tm8SjSrEw2OP96h+KL\n0x5n65vaWS9B5i37r1U43jIB8mmeZZf/BDifm6GB3iq+HXx3Rvb+r0o306Ev\ngpKsbF6q6ZNzLfkoEo2Qs2SXjQNSWDyEXGh2PFr7b/ijD6QtMkMcO3XF5u7d\nsX+CT4k7HZL3WSf1KjlYsQAgS+PazMI80IaQ1FtuQE9W0zcjCHWCEKXwEV32\ndb2ASBZ56itY5LusQUJT6+RPJv0pw40sgdnrz/pOuc1P9bMawtfhVCOnTJg0\nyfoBbTE+mZdG5R1sP2frztI7JO+URp0FHHSYxoIy4IFqQX+umQjL0OMLR+kH\nyKYnUa7LtztEhOJ2wXmXyWcozu3q4f5EFCwXaqVt9BpIoo8bUuopZzExGpvP\nWoy2aKokKiVyWYEwMdbNx9c93aHVE4Uwk20DW0FXzgSW+A0HrvEtB1FuBaqx\ng/2Dcdy/VOq3XN/O97vZkx1HZbpZIziE4iwQ5WASDaXTSdXpJPkMlS7RC86y\ntSof\r\n=Mlrt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqrho48yVXWbfwKq/wWAvS9jgWqB0hnsxT1o+mV7HybgIgHrXPIXAgRlGgYT2VwP+r+18x2jiT7hk/6NM6goU7IiE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_50.1.3-rc.17_1627395832928_0.2183359507858662"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.0":{"name":"ipfs-http-client","version":"51.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.0","ipfs-core-utils":"^0.9.0","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"ef41f924e415fc2acd30032e2b484bc32f042790","_id":"ipfs-http-client@51.0.0","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-ferjEsq1cxIJ+aLTJQAHceM/rHIYTdo983nWsbBoEMxj4TKKZ6MTQv8lTNYc6w/KEwE4zkCDme3M1quLARp2WA==","shasum":"eec632e70ac9a78343b2bcbe05a89e6e585f7b4c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.0.tgz","fileCount":446,"unpackedSize":605411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhACFUCRA9TVsSAnZWagAAhqwP/A70ykCPnStE2zSZ1zsL\nQGAN5evMx5isJspzis4Gsg9+GoUipr+cVdsh+Ny34S2C2d3QMo/HF2kIIcX9\nVxJGU1zHN+3uLo53YSpPEkPQwag7oUNsSI8AcXU+pUXFz1og2cWvUvIapdro\nBShBbWP9Zhl84NulQtz2zmg5a/FZ5sgbCBvji/QV/3kkSrWM83V6iRZaSSS0\nXi9Zh9Q4Ajz4Mx/IJpcBSwwyX/7QL0QJQyuDlCRGpeFERhD45HLy5r+WqvzP\nRjcCvU4azX3R+OJCpbK9+XujAVmB1B6MEEzJafVdTa3s6gQRUjpUIYx+I7f/\nkhNWDnqJAoqJ4SxPy0kTqMaNPuK/A6/0o4WJvQThEC/uiqoN7/O244LVvoHX\nttjNLExKnFqr+r6ZVi+IuBBsGAzUi5UPC+HTfdYDZx7by6UJ4l+vaenMYGBt\nV15HNsoP5K81AJgNEbfS4kmlB7L2+Vnf4VUYbn71n9akA8DO80Ed+j0WCyo1\nBpDUPsgpNnXVqHoptXcu8ra7PFH+JsFbK9aEq5piiNROfw3YE7dYEYpPEcop\nspywZVHkthfNSVp9BghSTxLOkv9m5i9Jore+oym7w7a1lWghOUwuZHvqBLjl\np5H8n3gtVRqLMrc/1iLaW6LWlPcnCJVQ0FaEqUBASSJ4kEZl8Wx3jtIesJr4\n7eFo\r\n=O83V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHKqJybMIJnNcGOAsNE2ISY8cVTyXlm8jIPBLS9HdyQ+AiEAuSoDDKau+ij/mK/wK+AScmzkO45fReGMGoGNee/aCEI="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.0_1627398484245_0.6751204566835236"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.1-rc.1":{"name":"ipfs-http-client","version":"51.0.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.1-rc.1+5c43562d","ipfs-core-utils":"^0.9.1-rc.1+5c43562d","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5c43562dd3ba2d2325e297e0a42ef441f9fd2615","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.1-rc.1","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-qFyZos+A5p381bio266d3Tnpbi2tyZPu6v07W0dtM2ZXiedzEJn9GRcBWyTeP6abNs/9wEyyG6Xo08MJidykVw==","shasum":"17fff0c831ff9a4373cbc77e4e23f24bc17fb95d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.1-rc.1.tgz","fileCount":445,"unpackedSize":599387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAT/ICRA9TVsSAnZWagAAocoQAI3PBTPumdwz75xt9Tti\niBs+WDBWDbbEQ2fmtkoDGNARXYg1jReq2J+3HNndzndH/gJnRZ377jIUDaQ2\nkyoFCQzAeqvfL61hAYKgF+8ryi3VFFxjlrOZMPJSb2SJmqGvYjh3d1YrvloY\nHXN42hZZ8GA9jsThB1AGz0RfKPt1r5kwHTcSlRCUiqbJWY2Y8A3JBrU2cMt+\n5lezLUItqyJxaGDjST18mMi15JZyPoNpDBUgMZClVVNz5L0R/QyyL9hR6awg\nrG9p1rG6wKpcZDPKWtxauvovVHPs1+e64DD0oQLldh9udllKhhN3G2RgGc2I\nU7+WDrRKK9IoavAmjijGVZj1E71z+Dfx10+aH5rsWWP9Jf3fhXmeG2apS4CA\nE/q6UJsNNczhpxc6j/fyZf/7HNDUWxWiETXGKVv5ldBYyJ6+snN8kCYiVPep\nO4OrQRYDwL1rMnXRdv2WZvEpfVSL4wUv0ztfwvq+pqVdDCSAEZ2uQL+cifv7\niG+5IfORlnQfFmfsi2YCJIi89+kU7eMG8Ob5sbpssI9Kz28ok4AIHFvQLy68\npp2VVpGHFSs0ilG2abgEIHZPu8iKAVAdlSV9OnNNfOyMg5CtTycqCJWWI20l\nWJdFIIxuSmTMtrpybSW6x+fB/zSX+PsonVJ1LNRatJlbxQaPeTmsShLsITEE\n6lwz\r\n=H7T0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHE0NPcbDGUSQ6ZPljwapWY68q1pjEV8aGsf+RoFL4rXAiEA3xo5zH/p4J5rR+3y4fPzds8RXrUwpTVv2jA7qoaQcHE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.1-rc.1_1627471816535_0.7270696477952812"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.1-rc.2":{"name":"ipfs-http-client","version":"51.0.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.1-rc.2+fa015c9b","ipfs-core-utils":"^0.9.1-rc.2+fa015c9b","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fa015c9b2291c375a5ecd86337831eb1071932e8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.1-rc.2","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-CkTb+eUZ/uFXqlbNLILMJk0AiQAMucE7vzCkVU62idpDs1bhKhlTwBjrb01LbnzckpmgNCxjK0ufCFUdmiYfFA==","shasum":"d2c3b2ef719e741339ec0964c040b828f31c5f5f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.1-rc.2.tgz","fileCount":445,"unpackedSize":599387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAUzBCRA9TVsSAnZWagAAszUP/22SN7vSuKFkCYECmnC+\nis+wuep+9bEA16H3dtkpRwj97fChbcIKU+QOpS68VvsyjvlWIxT4+4I6Qh+O\nxVikaEmPFwVVMJjL2EgG2lp/Li2sLvBOoAdIRtZPJydCkQRN57C4WRFi2zrS\nuiA3lcRBp49485ERlSuw9bC0eo1sf/MJYawoTuJeowJGoDicHbA79pvH3Fqx\nt0STU62a4XRPiKTVWNS1LW/QHRcoSyvhMt5zlDjLshHS13Dh9HGOVk1NT745\nALlTh069zwwsXrZMA+pU/Rp0IzVXjml7toJ+/N0arsdVk3Jvqjjsn3c6CCcU\nTE2WvKRZfwMZO36egeqPV1gh/5vISoOwxUq6o+K92VM2mwwhNJ4Tg1oXNOZF\n7XWICyiO92nexrKBCt/32a4nSq2yItdmCLUERHtFwiZFngG5xm7mDmE6X44/\nyHoDJMyqNd1nyj7CllqKfGSqMsuXcEFBXzQo2e6MQtUG2gl3oxGCPputdMkd\n74eEfJch/MEuFpzYvHrwn8qk6yrSJVteyEQ9lErY8HLp8cX+EnfYs3ZVlFPV\nTwP+wJ/iyUBsRsGyt+kKxhQMhD+MDblhLMRxa+eS2DseJ+vuNuDhOp+IxUNZ\njIGDDNo4kgJLAS9WBuKLQDTLfWmhg3E8FjidAy/sYcYT23WQWzJYz9nHoY14\nXdg0\r\n=75zS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYUwb/QM8DMm4uq3s4Ao068f1MflTU4kM57BbUY2Y8pAIhAMKZMnfaHxvjmGUHBX6qm4haXcWlFw6CXtQmLvv5OMQc"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.1-rc.2_1627475137296_0.08843004269705212"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.1-rc.5":{"name":"ipfs-http-client","version":"51.0.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.1-rc.5+43db72b8","ipfs-core-utils":"^0.9.1-rc.5+43db72b8","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"43db72b87f0153ae4e9c46aada750fbb85d0bac9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.1-rc.5","_nodeVersion":"14.17.3","_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","dist":{"integrity":"sha512-WhZd4oIaL9SaUjbtlOPxJiqz5m8+66YrVYMK2YY8vku6fQA5hVlNwVs0hFge6KbtOU1pmQHc+RWp/w9IQtTsag==","shasum":"3165013e22d340f182403f7b741698b78c1180d3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.1-rc.5.tgz","fileCount":445,"unpackedSize":599387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAYxRCRA9TVsSAnZWagAAXzgP/0qTT4Y43f7FQ5jJELTU\nZrP0+0SNVZQkhloBwNV9Fm6ZkjPwlbVioivMbtehGhi8tKp10tPShNETHIT+\newSqYqAf4x0Uw9fV+u0S8Q8POptcDVpFsHLCO0fRU5KSBKxB9DCnXALnG5dJ\nlRq5OhxujxfWEd87r+W4vqxMGHnF3xKOJ3NyJt6treJkbsyk9niR4Jinyhx+\n6J/PmL0yYa7PnL+LU9pnKW6lqctYoF7jRzNhs7mPfaBWq5kP/QsTaSvUIaXY\nd8pGMHVPLBB14+FS0wwXWRHdR6IXgPZG/qPY6fP/hArvI2zI1IV2oYCViZeD\niyxGhTvpNcMT5k/p7EvJexP3CqXXCQeN2C1bpDgcEfwuJ5zn/uVYK9nQfeQV\ngbI5RFE6AB4dDU90+1Tat5Fo/V0JpZJl7XP3GeDkYdEScBuyNfcpgv6ib+gq\nICHm6TO2mooQ05lI/0Q51jxI12d0GULqkzeExKizU9mE6B4cpgR31zMnso1Y\nXuNv+iKCH2IHfClVrpOF4Cs9UrRgc+Aat5gqYxoJvwWtlsGWzmA8AL8AUzda\nnspVQN5ZAjRaeZgvhnSLsdEFMPh2Oen2ka8qcD6EeQpqtZTAKGD4klKuYkPc\nTe9n57lPpZv9hAmefq2J6mhS3Zl2U3NQ3pNLye/AN64lKTiVuq2WQPkQgBad\npxxL\r\n=BWta\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEMgoJ9lP2vnLuas5Pax8eoVN2jRdZzXfruwXZYDgL2uAiEAsRZrC5b5BnVNqZjXkZJffw6onMTA05kU1xqje9AvXOU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.1-rc.5_1627491409405_0.5480037555588693"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.1":{"name":"ipfs-http-client","version":"51.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.1","ipfs-core-utils":"^0.9.1","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"dde3d28b4a0d0f74d73c0c0b38eda2e01874a2ed","_id":"ipfs-http-client@51.0.1","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-qNwD64XWn2SOndLBWr68y/ldPl7dMiPp/ACcb2myExb0qO9HrHpXVc0lCXd00Eo4cH8lb3tIVDn8xYDh5FYZ0Q==","shasum":"c4b64d0d032b83a4d5fa3ca7a9793e6d3233fb4c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.1.tgz","fileCount":446,"unpackedSize":608029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBDIVCRA9TVsSAnZWagAAWtwP/RWMsPjUQw34Q0Y2KDsz\ncCEBW7DDDtFZ1qSd3Qdy7iwiSCTNgngaUhfJD8WG8cM7Y+4dLWb6PT/NtXJf\nD4YlDNCilqWCmyOSjQVlVDg8m+cqFtC+5apAkGq8ZqavYnxSApV0ff3MyS1W\ntorB7DsGmmA/iWG9SPIyn8WJ4qZlyD4SO2fcGQYmLq1bbrldWiby964/PnzS\nXcnbKlYDDCzsBZ5bSvhCMMJ4wojVUtZbioI9Umht02wwOm63gbqhSg2j1lJy\nIyq59fjftSWhMBfQaO0wUEGvSski7Z3Nat+OIFhO1nORqZsAeB/2Wg8+fmF7\ntmSl6XGdC17lk0eRE2zTIDuaX0A5yvTs3Sjeb+uUtecjq6ThqpoDjYe34zUz\njJ2GNZ6I+BKUpkXo1rwxuQRN3CvFUhkonysoZJsdozKHaxvF3RCoKh6vxESf\nsE29SRqEsGWwDEUQPsQlJSFxIW4PBPFydUe8GlyNDqWyuy27ee8jPh8vl3aC\nPF9gIJiGh04gaKG9icq0jw84Z1EUA+ewUu99lmrCaDKPWvvX48/j7ytV7RnH\nEkNPeCci3Xh8fJ1i1bq4rSi5XgC+Wfi9NkRMnqHZncLkVzDY3wRDrTIKwUxC\nHYpgcY3S0IBtPFlFHIgluWlREwjdodUIPKDUf34E3tnyhNj2vzMa4tNpKARV\n0ZOy\r\n=Zy6Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbgCbLSuU8raAeQ487XV2deQh5nCsBEYJSqD4BpzyLTAiAa997wdki952YTrWDcCx7Xe27IxTu/ubxIVCwXgp1EOw=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.1_1627664917442_0.6801720725394336"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.1-rc.7":{"name":"ipfs-http-client","version":"51.0.1-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.1-rc.7+fa78b4fe","ipfs-core-utils":"^0.9.1-rc.7+fa78b4fe","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fa78b4fe1386a151422bbccf33818f3b15fa36de","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.1-rc.7","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-x2X3hHSSCVOF2/uFarj05jT1chlRf9mR7fppBOzLoIv1PnrrXpXkuPNaghq9/39/KlCcoPtF2uI6JWXS8fuSiw==","shasum":"d1df9e0f328971d72a898b2fa3baf4abef301fa0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.1-rc.7.tgz","fileCount":445,"unpackedSize":601826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBDdXCRA9TVsSAnZWagAAYswP/0HIhVlM9Y2xxCgAJR/3\nOHi/UUNhZxKhMB+2tPQfd8IqKjenzudoLoJBqZKRZVLRGzIaIqY/Uvz8UQlp\nkSwYmsnMv1j4IzZqMN9uNAVA70vThgZvbgy/ArulT+iC/9fJSKOsykNhu2pM\nHncq8O8hxv7ZuhxhU69GSt761lWLudm4WlvIl1AwxugpfFFj1DDBmFk1VVl9\nHg5v+770M0+LV7Ss0vU2+FJcX09RPikmh7jBivecSfX/aIhJaS4/l0b5/otX\nm2+q4R9zcJl0P9roV7B0BhRWjdWBjYZ4NQMcvBveMgoYVdbU29Jw3A0vb92p\n2OdKtEAaY1sT5r64gMKO4srhQWdGdZWRKDHYbkrYHEsJaeimt9onm/iNWbO4\n1676JnWsnfy2Bw2wRmIzhI/tmLAr8ScUF9XEaUuC6G3LuZtFsE5LiD91KAmS\nr7bnVdSIBb0b1yqYRAOkiJcehRAEBfnOZ0exPRaNk82/DJ+QCW+vTGLHaRS/\nUa2IR7UWxn3GxYPe/Yi2xQzpe0u+JIgx3loPff/OQ6/Qea7QoFblGdKy6h22\ngS0kRM73PNhWqr3XplsqZVpxzmEsS5MW/IsYKSkWW4n1NIZIrJPKWfEHcNtb\nfGJWbaQfPoeRXwRR3I560Q5i8G+AgQcVwlYLuixv3ov3szVdJKH62QWNGx8c\nCGhK\r\n=buuN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAX41LmPOk78ZLPALcXLMzV7Bv0P895eO4Hy7MnSBg00AiBZvWVLYEOkEegUDaiHb1J/4J1GuTcQ0YXLF0Scqw1mlg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.1-rc.7_1627666262755_0.40623556290189855"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.1":{"name":"ipfs-http-client","version":"51.0.2-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.1+48f655ad","ipfs-core-utils":"^0.9.2-rc.1+48f655ad","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"48f655ad4a2ec96f84c4f73082919a753523408b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.1","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-iGCD0T3DnJgAhjqSy5cg8xUtJpxVcXgYp9ofwU9Afy8PkTYsUHYisXWiK/wd7OjMDxYVrwA1b2efkJlhkgpPLA==","shasum":"fa04315c353e2fdeb2d74c474b6b731104ea3eeb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.1.tgz","fileCount":445,"unpackedSize":602005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBEuUCRA9TVsSAnZWagAAWFEQAKDBWGP/OrDQ6v9RJf5I\n1q3wjBBS3eUyjfS8pNF20ZZpwJLgeMcH3Hpbe7nLLC1me7uQVUg0oQbwMtFb\nEdlLo9aXBJw647bax2N2nCDPabP5APRv9OL/4XlX5t6a27cP86X7TC0I9H/Q\nhqq4fR0uV0LCanxEwqyX1O7GUTf6+zGu0qzEtQQ3G530wB66ZaoOyXpm3plu\nnl6JI1B21NrHCEqHd6ydD5QytGtXpCcXq2vy+cHbNFiYTMDZQSYbi9HnYSyi\nRo/8lL8IbykLVHanJj4vSe6zXOkcv1HGuTwH+igxqWmIloXcZPF/3H42B9n4\neWz/aSDwNW2L5L3z+rUq7ba+/DigJtfXY+arGLICeVoP1cdwjFXGH1kCv88f\nggAuxPDkTeXET7vTxS/v31U+6I/dQFClIdZOi8t4jAzzoiT3mL2tJVLqGQVy\nWsdkDWWk0bZyB88EV243pzlqw1qMm4IhqMTrNMtaVAMVbnkpa6kbbD+EQIbX\nQEIwfB9CIQNSe0KLwUcsjRq9QlDJTWrAwX6lZq2lwyWvFH23fedDNeZIXM5I\nuqSeggKYBgeRcn80sIuDnS/BN+ybFqC7HrYsoLblynlAD5kydeVhAoegvC3E\naZYRnS32/B7rTgaIKw38izdP8SoDVNsGPGYLDAXFoXlRad+c8qUkxsUyb3pO\nhu0J\r\n=6gcL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdmrB5P1LIbnDn1YsGrpWHqdEivh7ewwg+ErBIzOSF6AiAYbs/IHMG058DNoRTg7DnkyXsO+Vwz2HOolGyyOixTQA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.1_1627671444262_0.3143032247414981"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.2":{"name":"ipfs-http-client","version":"51.0.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.2+1db6b88a","ipfs-core-utils":"^0.9.2-rc.2+1db6b88a","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1db6b88afc5647d3a187e0ca4199d8ab2082c629","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.2","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-kv7vUY6Inp2jkhGsGX9B+gG/EAWXqjjvwtDYSmrO2Uw8oCy70nbLy1HNnino084lY3L3yVPBld1NeSE2gU1Avw==","shasum":"7bbb80131cb17cbf479f09ebe68c3a24abd3b163","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.2.tgz","fileCount":445,"unpackedSize":602005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCpu0CRA9TVsSAnZWagAA1JQP/2/0D/NNVokuw4yr+rSv\nxtHjxMShV+NLziBU4W4j2/YE9+eQW290gd3nsreEMP5tlzI2PrueWMHiJKH6\nMkR6hwc7EM52KuaC0zmP5wVphKSqZCEtrGKp/EqpZYeky6b0bSD5XFJcueK4\nkVIHAfKL3LoTymN1p/da31gxO8Hr1J90uMYSV1GlxUw80nwW9bOYGq43Br6d\n3T6JU8B5nxLHrde3JAfsxfQUHWz7HoKvNDwVjzjlvplPNqDzI5ZjYqJR2PbZ\n7alVd2DQqfiuVohSoMR6P49EfBjM/LVYzcrCRfjMmDG/XPmaSPnBQZmWFidk\njzHr+QmUFWWYEb79UaA9sqZaLI2xOEbo11UY8xxGRNpsY1o3vn507/OIrCJe\nbrTXcVshEkl0/hF69/b3CZYoH7L99H1NDZ7EP4G+OvgT3c6f4r7jZUfmPSDi\njhqjcfLWPxRZLLoAl/0q/iOLFJ47xm5G8XjhvnmMaDdSbnCdqj01nPC+XjCd\nPznN2gBeg4frpDgkb0M6fmHAL6HT+j76ts8gcYfx3Ketv3ouNoJUF45UHsw6\nIQpzxNFgIcJ8JqmuYhIhDVcvzabtILpi7C9vSWs4Ym3yECjVvV4mucTpwuby\nJf6re7a0WcTUNUqzpXLixXHx8Bb5qUveI7E+GTSJ2jNEEtoYNYOe/Xsa+NGe\nQKhj\r\n=qITR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA838DNigJzhG2jS/FOqY4FMcxPMHTtoAvFaPey7tLZAIgbJ+uLY+gGJD+FZN0rpQfr8ZBC6QPqKFiNeJRUUuxlMg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.2_1628085172335_0.6124715796489977"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.3":{"name":"ipfs-http-client","version":"51.0.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.3+6adc3fa1","ipfs-core-utils":"^0.9.2-rc.3+6adc3fa1","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-map":"^1.0.4","it-tar":"^3.0.0","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^9.0.0","it-all":"^1.0.4","it-concat":"^2.0.0","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6adc3fa18f1dedea22babce41d24d7435e497ecc","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.3","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-vRQG4GfxNm0Qcu4iz4jOzniKlTFp4TX9FhI2F079lYoLmg9AalYRjvpMIzzVdBsGkRykzytmTj+juZ5AMlf80Q==","shasum":"e712bbdd50fe0bf49fc0686125e87329e3a5b7b4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.3.tgz","fileCount":445,"unpackedSize":602005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC9ADCRA9TVsSAnZWagAAXBwP/2Yl8UP5mquBew88+5Su\nlfllPk54TnOW0wNJCTeeK0W5iu1DBXUHbwa5fy4GEilhtxwr4D7mgMnNwhsj\n38aVAsa4dWnaNLyhrvb3ubV3S3XLthVCR+Ke6l1/2JwvkdiRFsgL+928UnOh\n7GCB4hmqsNsJK7XJPWSEK2eiwXBbI6BIa0T4C6J7tvD7rZoOx5kRSrRQ0M/l\nekEjU0+gH9bcQz8BWOGnpZzkjyE3PZrUUswSlwfdNSJe26mrD7B8d8Sniehl\nVi83LRDsFxDa27yFiNSosZ4Xr+uO9lZEYWUCcBY5QPg46nPlp+yztn7ceQp2\nrEwojiXinSsf4kqNTxeqqdBPZ5+q+T9PVpRFXkt2U8Rpsphus/9+6NuGI479\nCCoxJ7VRZ/2pRyMlUn1ge0V2Oz10RW3h62l3KynHte7MD+EhRO3h5XIO1goU\n6F+CnYGuGQAW7NIQRZvgIYEFEATV2rjgJL/P+XenIrY6olio0nG1szRbXUvV\nzvGPKQeHz25PAbn13iXmt35cLddGrcSCJajc4C4EoSNXSSXSoGjiZvShH7d6\ng//P6WjHt3sRwsAdWC5MpliKKQBQPTq5syY0btf9BSZo5TEL/2agTe5Miyxb\nk5JGh5ApHt0KxnqLQ6052t7Qe3w7UtKoyNWfH04RiJih6obozHcjyXO+6dYh\nKWgo\r\n=+Wnd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEAmWHHpefs+uNHS4bcn7MblE24+T73nIrVuSFZA7asoAiAPhgza3U2ueJ9JWSzVHPM4s9XfhyPw02fCQTSGar1GcA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.3_1628164099023_0.85567621518679"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.6":{"name":"ipfs-http-client","version":"51.0.2-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.6+a6c68803","ipfs-core-utils":"^0.9.2-rc.6+a6c68803","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"a6c68803ca19536c022c72554af2311962b2a063","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.6","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-p6M6wCr3Nswa3uU0r+sy5QoA39+oxgQ/Lw0Jc5LD82HB1Gh7ZHSxZtSWkgWTTmTTKCXVokFUd1kgieNQRr/2qg==","shasum":"07fab4b897cd61770e3e2aba7ab9020dfed98da6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.6.tgz","fileCount":445,"unpackedSize":546890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEViiCRA9TVsSAnZWagAATKMP/0ul+rfHZIA3mevWUIWy\nZwHQLn5HVQ0A6skRaRYqjWr0ZqcDCait8eWXN+uP669qErf18tV+F6PGORt4\nDEnb+3QaAczD6//1a6Hp9oZePAZOuci284S+Y4Tza0jlR4PB8rCrFXyX17DC\n4XRqQXB6jAAgbCWNYKWDfber9XSARmbgG82RWiyWfgtvwOenqETffJZKJdhr\nvi5Y16Mxt2/5sva2PLQV7dxYbm+Z545tPxLiiF3QoGB3prguBb6FfMuIYZ3r\na9q+KMFAezKltCrmCxa6GxMQgfVjSlLXLTeBX7Yzx+MF+FUwTjrt0I3XBLdZ\ndCDGy9uIMQGjwjOtycrrbr6cpy714tjRxJdT1a4rSMQyXaDlM8A+1YJXuWN3\nw3nfHoiR8xnD+pp4Xh4qxPHBJlorw37IV0ozAHUAbnqCymT5RJiMsXyVHDKY\nWDg5iFduFrWLl7H+s+a3NfImnJbhRBzkGcW7gGyWdycw1l53CyeoNHkl1XCZ\nMfhiNQqkaOAfDPopC/twiFg97bX1TJCnYPh1kacgMwTJlFV9zGaa8YfGRtAM\nurMIAojxiCye1+HzpQ34tsuOBDfRzkmPCcGZGV0EuGsPRyJuDi8gxsa2cNAN\nd8E63jXS2nYXkzhSMG1yti8K0D4yRY34TfLS+3sA73c+WY9qoBJG0Uj3ijmx\n0oz/\r\n=NTxj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZ8Ww8iMBJvFrW2Nak+Mt7UWh46oEo56Bc2rOk/D1PfAiAskIuTuDKkTKTcN32OzjURsKs3NWs3XlFxUsZSnQWeeQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.6_1628526754000_0.6772749391882216"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.8":{"name":"ipfs-http-client","version":"51.0.2-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.8+213f0b2d","ipfs-core-utils":"^0.9.2-rc.8+213f0b2d","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"213f0b2df0e407dbb97ac2de9b82830da234fbb0","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.8","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-mFn0FTVaPjOyWdCnSiN6bHceaUAbuBXtNdXaF0bga0G5yyJyf8XUNB4PC1Kkp4ejVdbdYwmTN0EGQuHHu8tC6g==","shasum":"3422b566e52ea704fc04080ed8a181653fb78e09","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.8.tgz","fileCount":445,"unpackedSize":546890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEiiFCRA9TVsSAnZWagAAH9AP/0aMG47zrZVVfcdSr5Gz\nHaLa58IejN615sFu78FS50ZqYOSWL7Vjj6c/LubCNdRrPFenMtQ6FLz5P3s7\noEtGolzqdZp0uVxT57k/ItJxkxWYbVgdLDENCiJMufuKBew9Djb1kSfBYIx8\nr28xdo7QVGenHuAcxVcBC9tSZ+gpd2+3MmdLbwImiaEnRYcX89z9vnlYBmcO\nGH+IthxYfyN1fDrC3sEx2JnGQ1UMMCOHVt9YTED+28wmab81avnWZ2xzsh0y\naxLiGsiaTR2NAAwG2bxdGHHbrrsNbPlNUjU6fO23UbOlFPq8ooXg3y/b+TpL\npyWtNp0fdMqxqhx3Iy6s6b+mq5oVx8kroZChcjy6F3aLHLvfc3HVhKIqbaJ5\n78FpMRA+YvgAf0D8tP4SXZe7Yi97QIXNA2TYU3theHJ0zV7SaTPKSQgs6078\nBnD730N1nEwiwc8eMYG7kuYGXzGbOUiD+/iibh8CUVrAojeLdCWs0EwGpDlB\nn4yqFoEYW5BqAauH1197mYKjZmnIHHvvEkdlQY/kvC7jCexDuAWoSogI4UwS\nxUwIyqrlbDsZL5KnjjCIga+Db8I4wGYXL47U59TfA5GM0zzGmBm+Ddyz7oSI\nmSLssLd4oUSsduzQJOpDS6puBsuQZL+yIZlc6XL5AtNtBD8DtbKhbeRA3imy\nU/7q\r\n=4/uL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmIQr9im3sVIO6GmkIH2kWs+7dWbEMan5ZjPYKTWsJPQIgKiKNCIaqNmMeOhK6Vd/Fog3GIf6Ms6R66MmGbN3T0tQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.8_1628579972591_0.38938365214667003"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.10":{"name":"ipfs-http-client","version":"51.0.2-rc.10","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.10+4150d1e7","ipfs-core-utils":"^0.9.2-rc.10+4150d1e7","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.8.0","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4150d1e736c15863ae7e354fd1f7d6d4e34e4452","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.10","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-77kRPcYI4F+lIzM2MPxrQ5gaQkOREh+nWMj0ueAuZQmaXl+AlO0qEXFP4II/tU4g9u/1CYPy1/tNUbgYlaDzqA==","shasum":"17a5312832e19bc063312458a12686120f7cae7a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.10.tgz","fileCount":445,"unpackedSize":546909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEkJjCRA9TVsSAnZWagAApFAP/2MPJ30tZTbEemxrB9qn\noA2103W+P1sLQ0IxexbfZiIQ5u1B6i1+u6ywf8BKx+E3H7/XJpyR06XWX+Rr\nV8dprTG6xh5YpjqtiPMAJ+XNO95FVb3+Yzza+HcJPdvDAEapCxkvTjlIUcBr\nBp/yuf3bwpr37KCrcBp4ixiwbQgurx0boPrHiS1Z3TE4jxp+vNt8NVN7AxVI\nI8ry86IRh9ModnwzPAi+WNpGvoorhGfOodUmB9Q6jpcDZVWYJDd4YrbH4kRQ\nD+NI5WvSHBLbB9EsN7bfmQIzRDPGgIStPo6Ykpp86wvvszwedVk5EqpCceRP\n0KC0RymxAS7cmHXOZr27QCjyJAtAAfixMVNq8Mu7qB4cgcKPr3l9xPbBYSC1\n10TXWTZhNf4TsvMwLmoy+EI4iE6xrnvV6CPJlr9WWlC1wJWUhnsBvY4mZhxN\nuEv/G73JZkHqGjarga+Qx4lkwUM1KnmLQx9koPtwTYSVB5DOZoBiPmrxTErg\nI4KOTImxXtJuh3AK7xEYf7Zb9tOn4txSZmVvTh/HyH5aOLpVKZuDA7nngVtj\nztewvL9ZmjCgFBPJLCbsvh2nA0KKvI5kdyMNNv/ySevooDSDUi5pdf8okcyN\njd4Nc3u8PjTijveMack4y3n5OjJmfUQwVHq1Jbk06V4RDc95Ua6zwX5SVn7H\nY52F\r\n=pBwV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEC94hiozZBQcWo6jIMjANvJ6eEt5d8FceAHRbP68ZUhAiAtv417YcDYvNItHilO2VuRVd5PIth0mGjJ+EWTRVp5cQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.10_1628586594866_0.5635094882671845"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"51.0.2-rc.11":{"name":"ipfs-http-client","version":"51.0.2-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.6.2-rc.11+fae59868","ipfs-core-utils":"^0.9.2-rc.11+fae59868","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fae598689a0b9a3bdcf80ac71c19b709294f2932","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@51.0.2-rc.11","_nodeVersion":"14.17.4","_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","dist":{"integrity":"sha512-UwZCFti92oqQ42HfpN8JJVhZB7vmKgZumUHv5NL3lED8aojLq7AmumeqtX4Wt9v28f2wn3rSpWQvEVPuuqK1uw==","shasum":"ad6d92da4fcbdbe5bacec94bc212b3b188528210","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-51.0.2-rc.11.tgz","fileCount":445,"unpackedSize":546909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE5bvCRA9TVsSAnZWagAA7TwQAIbCF6GZydiAcZwP/6Zq\nqFUJtbV27rvill0FRecN+m6sD7/DyUaf5KpfQdzs3q1Ok0I6mdExZsp90b3i\nnjyHOfsaxtFPB7fvpU8Zo72k1nKVUcwOYu0G1z21Z5r2aqnDe+N21WyIArkp\nrfqqOM64/7KT5gTUPG+IVWlTq8vRXeU0K2qIVFFhdVEgkSTrPP13yOWIklri\nMKai3M0Q0+s4BnAh3LslCpK2glDZ/+QsYj7hAm1c9MCG8Y2mJtIme6RYK4UQ\nUeQdYcXjEtTFGn8j4Ir35q3kb/fliBTj1eIX02rGe8ODmnpGMkDPvspIvzD1\nklFUqSRhxcoKDQF9zythkhAsodfYcATNStzhnvw7e6ocepdwkuQJQ8A8FI6m\n10lEAPg4s3+RkBZrP+2LUpopg80nAv98OV6lzlwU7odNPpdWMu7gMxlXTRZS\n19PkRC1Nt0F3c0hJGHDiFlvGKqMJeVtzkQtYQod6i05V8bqk+Hv4GYH9r37S\nua8zVO4VtQVCBFCGU61G+3qgLlHbrJTN9DVBcLrJz8uTGnTtAwCb5nSM4CKb\n/948XiNyt7qn4lDwCXyIU4QA8B/iDiCZmq95+XbOtKtpTO6LVZ8JVjGpsoCN\nhc0ol+e2HPJ7E+okmYAYDv7/qB9yKmtfv6x/4CsJM7ochpxXBGugRbV7Lsf4\nJdXC\r\n=VXNt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE9C2G5gWKtwvp4NOfe/BO5r+rrSVBLdTHc+pjobyjPJAiEAw28LBt08QYFMOWTYZWOSua5d+hBrYL6NgUdB3yxcsPM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_51.0.2-rc.11_1628673775474_0.716683945788676"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.0":{"name":"ipfs-http-client","version":"52.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.0","ipfs-core-utils":"^0.10.0","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"7f241319856719f2d9f2c1fc4a6b1062ed1ad398","_id":"ipfs-http-client@52.0.0","_nodeVersion":"14.16.0","_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (darwin)","dist":{"integrity":"sha512-1RvLTRZMhiR8tDt+UYmG++R7knf1aCncLwIVtEbD1vPAkYaPVQQTyWl9z58q6sDnsG4mWlbrVAXU6q48qWokJg==","shasum":"ee03fe88bafc2482ddd2eed5c833fa1b77233339","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.0.tgz","fileCount":446,"unpackedSize":554266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+i9CRA9TVsSAnZWagAAVscP/iEZ86HQgjZ3Tb8/zjrN\nqrv8EhTpZ8fu4KGG76xjXdzQVRHwhoPmFCKOCWnr/qRLp0f7ao0KLpbnTYyY\n64tBNlZVZBaGoDeVjoS66XdmAmPSb1RwKoU9gVsU8ueMNlF5XXVfaMKNNgek\n4nX8ofHlADlAmA5aiCOYmwqxtljMbIswHvjyiHMVFL4So2UPHGvtVV+ow54r\nVw4+fevuwGJdZ3iV+nBPfHLxthdcL3TYyO86NFOLCB/niyP4p9qloxjKYjIJ\nZQp8Mh962hk8IxkNpeysgz2lnL3Ffjd+QpL5q5p8eXLkrc/TEtHWQ9aXZx0D\neiaiZclxVQ+uST/Pe2E1UrAYJXGk3FfW6tDHYeNpN/nvoP2Y9KF4VO92yFOB\neJWpV6AdZoVf0PxYwczJONzlXTKwlfW1ihJfASFLD7woVeL4lE57lYb1eMuu\nMR9Ww8zyEWLuwtvXe7o+ZUKGdnYTR4IR/l5tu7Rr6qhwIVqPZjVEpcfmqlCZ\nJjzp+LwdCxdxUc/PFMsl3AFpNR3pATihLtr4oh0xyRvxPiRT6Zl18pDuLGbs\nxmmd196Wsq/QRCHRLpACWtiABc7Y83z0iYGfb8VdggXKCvBxzO5yhwnOU9MW\nlFqngGplQ1Lgk+WrTJMmyUkZtlipKMvnnJcq1CQ40x3jRUmryS94NqN3sG4d\noCOw\r\n=0Aqr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaJAQeBd3pxjGrL7iPun46M7AoEFZAn4+LlZIy1ejRuAIhANe6lljbQXwxFIKqjzNzDIR2xGuaYCsbnT7UeGVZlUvN"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.0_1628694717296_0.8046661507402395"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1-rc.4":{"name":"ipfs-http-client","version":"52.0.1-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.4+b7735674","ipfs-core-utils":"^0.10.1-rc.4+b7735674","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"3.1.23","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b77356741ac597f57e0b9ed57cddcf0ce3fe7806","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.1-rc.4","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-cuIENM/eEzjlzg4929+WGJUPv//NZLVplTqGtFXAWnM2V3fusfIRZnihvgt0AGYTsJ5N44Lfadp3qOcr/xnYGQ==","shasum":"b30d12f222ca43a91116e035e977b73fb78f79c1","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1-rc.4.tgz","fileCount":445,"unpackedSize":548159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFP0bCRA9TVsSAnZWagAA+ekP/1LbdRc7xN+wRNMn2z6j\nRGvbWla76os2xa5VMv7xZjjXFtPGhZI51zlJHZNa5gtiR8+st7XeTtwoidld\n3U4nSVIzn5NAKVBM8bG9gYWslPaw2qvAkMclwxzGkNlLruBgrSzwrr0pLu1Z\nhEuVr7sexn/fy63tiwm3s5sgsDeYKhBcb91mOkg4aThZXS1PJoW7QzGjA5av\nVZ2bwxmUIQZZfbgOpN8ek5yDGxlmWbBYT5ygxrO2l8Fv33fE4yBvtVS1Vjre\nQUFYUToLt4awT4qj0zDkN1e2QYnUv74td7r2qobEsOQoN7lCa4tLSbfmPNSX\nNSLA8/YhBsq01UbKIkAh8u8RSLCZJUZxDJMxfi5pOJ0/RGCovgL9gpTIDzKJ\nnzMkgHcHLHLsAA9elI0fK7wFDB6GlMLWrtYOqUpl+3/d6kLchPVNypAKv2iw\nIiU2/EDSZVB9qAi8D4GUBqxVp06vP4fxfsDAdS3gGXTZiohGGgjLkA6SSwH8\nLBJOBhJC8T9zk1Msm18FzxdPOmtNfsszS1Pm+S/immpnUJC3V3dpXD9nIvKb\n7K3wcKoipSVTU3fxmXlXAIzzJ5Tg0ooHdrUc1FQ54LgIp/LtMBluRyqtpJbH\no1ptxCfLpTx9kMGIx6i7SobGsk560nqbm6rr5ZV14Rv9ewgZiO73XpXUwqy3\niPFs\r\n=NS3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7kkpL2oRkIMAWNs5aOcB2IyUX8RtPg+iYG5+njEFVswIhAOOibHwTshpe2aBA9wGFYSMtDYXp6m6KKrvGc+JkT+gn"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1-rc.4_1628765466957_0.9935310760290561"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1-rc.5":{"name":"ipfs-http-client","version":"52.0.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.5+55dfd937","ipfs-core-utils":"^0.10.1-rc.5+55dfd937","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"3.1.23","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"55dfd937e4175e049287b9093ed9a52bcf085711","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.1-rc.5","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-HPExdo6LkU6ecfEKMJD9h0QzgSqPWuK3KqDoSpfI4epq/cI7svH786lYjX3VcZif0XS9JsM2aqz1T9UMBOa9Eg==","shasum":"326e6199c1fdaad7c4e3652fa95c519bcdb254a5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1-rc.5.tgz","fileCount":445,"unpackedSize":548159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFQDpCRA9TVsSAnZWagAAR6EQAJfII7wKWGAcRedUeDO/\nQ1PNLOGb8EvawHoWSvnYmKrTvVtHxgYAlCrZTMsZ7PIzOKFfFUD/zrA/jbv2\nvkLi2p9j7EoCuxCb3fMg81j8kS2xP8kaqz0uklHCsoJZXZFKJeepV6wpsQeB\na/rsL+niMQQvjue4Tj/vE9MOs3a6FV6bf6sdnBOpGofQzomDJDEcouusqC7K\nHGyxCGxU+VFa3LIHcZNE1iJu2H910tRZqfWjXj/NF4nafDt37OvID6IGZSxf\n9wnwr/Phga3B6mnpuv+tROZz0ns+JAagunwjJGypOYQLCkRXUeGMjIe5qCw1\nlgp68lSGUGPG2lUtXKLSWcLO//OSo0BChWq0FKXpA44yFCHLhfbKcXRQkPQH\n4KzNSiM/G+loxTM9UTatFdV/HFqUsc7+KDrSTELDcSZuYO8wvm093h+autt2\nliCLtG0kUGjaLxv+gqO16NPlRRbO+TbotOlq7DXRN9GOVAou2WcoWkh3sB4x\nVuw0Erz5kfDi/5ufJ1SgqfxgyhXBB2n0PbTdFQ9oKg7SbcCbxCWg1oVGTtcX\ndf5PSn79wQ03kmPwgenz5Ze+Retel2pK7/2je85TnSp2CjWP7BPF1/GpVfOY\n3+AzbLDSUVZUCpCQEK2XaJi3Z2aSJdWUUZd59sb9tWzSpAUbz7gQHOWkXTkA\nZBxg\r\n=HiK/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9DLRnAXlxT4/eamV8PTqt7gyJs27t6CSp9AHyU/wvCAIgCZozOGZJ7jihZc6/onJWJRPkJdEthJX7hA1HwDYIxeM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1-rc.5_1628766440987_0.17861342673846425"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1-rc.6":{"name":"ipfs-http-client","version":"52.0.1-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.6+9eb29106","ipfs-core-utils":"^0.10.1-rc.6+9eb29106","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"9eb29106c07253d50121a5be1aaceaf62b022742","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.1-rc.6","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-eKTK6lOUKoVu/SDPn57xY1GjzCyYGrdUki6PjzRUHZ8grbZrXe3CTLn9w8CGdwhmiiDou2N0tyYgqXyV8mejGA==","shasum":"573568d208afe0f7f63cdc5ab89a46eec0c88adc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1-rc.6.tgz","fileCount":445,"unpackedSize":548160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFSvzCRA9TVsSAnZWagAAmvMP/23MjzxsuTPxMsf34RBK\n54AZKqQB4FiTLGd8MfXAZOe5FIIW44S4MYzuLFAn2McQi6l9yfR5+lYDQJal\nnHCHaI8U+r6vXc2WYFVNjDbNehaGpBwVxO+zygYPvWn8B+vu3bXeFC5GBBqv\n6gGBHZ0C/rzh2lAXwkVEl1SkN0lNqZZYUrlNobXnxbfAAxBrI3WxsakwsYzY\nv0sgNHyzxVs5vKt3vFf5mxh29MYtMFf4l5scJrad+Gv+lD/WZ79zp7XFPvyy\n1wOtx2jV4QsmoigLWzMFhGCDir1K36TdJzeCHTwi4SYjtpwGjvEMrn2kk/0S\npsDNd78JscljGC1rILJxurj4t89D+4voUqRewvXwNI+kooJdlQeWqxQRHWR9\nqGuosguUD8QAJ1cYVEUX/2WLMa5XdhCdoBK9OrC1E6ArWAfAlnrIgs06RZOz\ndGToBRPGVzmaUn3wFh7Zb3LrQAi+RdmTQU0rWnbn439aBvYimxBUXQD5bXJH\n8Goo3iKU71KAqKfOPAB3Edzp1xeAxdCLvCnizNhQUNXPQ/18HxVVfZhpgwma\n0A09QIdHflVQkclKtHm/19qSegmTJhsJGJUg98uA8P91yGKW0CZbu71rk7Z7\ng/xcRDgrMl2wTQxeL7K1lxvcEBJJXbe1GGbunHNHmlnHPr7qB73UmRHerxnd\nGGtC\r\n=6lYY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLd+kQSi3u8dto3dYZh2kKOQaOfGY9HzixhE7bbOooIQIhAOdJearPrHW05WhVwHjtHIigKeVpHeZy5bj+fHRSkLHr"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1-rc.6_1628777458892_0.8335554619574281"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1-rc.7":{"name":"ipfs-http-client","version":"52.0.1-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.7+1fa4e8d3","ipfs-core-utils":"^0.10.1-rc.7+1fa4e8d3","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1fa4e8d34f47d1d6273b6d82801d324dcbc6cb61","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.1-rc.7","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-fJpOBU59tL9HuszDfcj+IvmVP0sjD1vbsFNMPut6wRWLYwVwntO1G2az93N5mPgNTQNT4Pd+OHYPrbjPHJuZyg==","shasum":"30d45179ab248fdc61dc19023c19275547b5fc69","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1-rc.7.tgz","fileCount":445,"unpackedSize":548160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGoiNCRA9TVsSAnZWagAAz/AP/jzbsp78jvvXFv4JGUec\nSn3aLE4E3kZcViInII3qK9IdXYFCxotH//j266mAGl0WX5mQ0tk8dQLhxK0K\nYLupewf7uGhidki442+2u+JNOAS8rlsq0omwCoFJUSLSSCzEIeYrfGIcEfBP\nF7HDD1vcrQSMwZ6UzZFHad3nP5VZ4Y/DZHjeR8pjYgxm2YFEc01+rjpZ89WZ\nT9noo5eTFskq/JBcIcpL9kEi9ofX89FgUrAVR6tLiCybzKdouujdqmsqj0Js\nXuvfg/hlRCkDdYRBTq9q8Sz1F4Zz+BQlYq99BJTtq8LvB7CxHcZqT17Px1hH\nZqab7UtRuAqvy20rmHAxHGp5xMNuIuYEx/YhbI09NHWRZuLfVGUhJKUE3W+A\nNINuA/OPVFu6UTO2l3rYGrYulhHzrsr6cVUiJtvz9WN/KWfC2ZINxKwjx5ZN\nYjP5ZxOosmS4eR6HePihv+8q9jT1MzW+xHYZlPafpDlSgh/ec8/bjVQLUlX/\nWpVxloKntZX1rmfkUGVeI6aEm/tq0qAAwDb+qpXrz3L8Qk+AtzhDb5hJ/qRC\n/w9XTn9HsuGftrtD2Y09zucg8HVhZLDNxaDA7OmM2PNmdx4hBfhW8Pb8zXwO\nSpeZP3Z1JlgOQLAiMaBssJIitTD45yYHvhuq5MLrvH2GmNZJZTmHsMDsG8Pp\nkYiE\r\n=blDL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDekpxReXpgxmHVQZLSq3IQn2Le0plvb2uz/+aNue5iagIgT6H4Yom8phkIIapBya2VoMF1e++dupzxzGoWUcg/cQA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1-rc.7_1629128845427_0.6045196991576958"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1":{"name":"ipfs-http-client","version":"52.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.0","ipfs-core-utils":"^0.10.1","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"f9099fd0b24c0f474f5a9a3309c16adad5574b83","_id":"ipfs-http-client@52.0.1","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+x64 (darwin)","dist":{"integrity":"sha512-ZaTVIaidxbzDKyVT9S+XC2pvCEq/m1QV94vZD544hVcElpUt5ZQHIKSLmEo454R2wEeXGTp0N99oagFuzQVGZQ==","shasum":"a45bac51aaca02316accbf0ebfb8abed1df1fd8f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1.tgz","fileCount":446,"unpackedSize":554640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG5KkCRA9TVsSAnZWagAAP/oQAIZnN3ZJCfK+kDCBrZVO\npngBQLBko6dexDoVGHi86YfZfzbL8oldMLfVcE6HukHHl3e6/+AbRbV0nD1e\nN6Ob/335+jDO9JdiMuKy5Pqz23ufg0+1Oj1pKvgfN3zoq+LpDe6B5pWENgQu\npzWAkT48qObBTOxd2KBCLeEfl/bql6x2/aXOuJCoBiepfihhdZ3MUcrTBrh8\nzm3+RY98ZtdsXfcIX9N7s1Itqnla5bG7Wzt5YlEKmtMyriBX09KQFgR4VSKL\nyQXP8b0a0IE1BqUaLVI8lK+b7okv8hezwnTQtFzGFqxiqBsNVACwh/WXXwax\nCTMOyG7sPgJo2TNjESQWJQ39OaBZN+TNVbqr941bHUNnPCbkNM0HbfjG44im\nNTUxdic9Kp5ik517l+NTjGIlvXhC5+XWgTVrBGKsApoaiqEp9A7xGLWWNJjg\nxKZYpFWFwMc3luBNHG7XTTRC1e0Gx0IpWm77yOZUqHCAwLIYGfqaeBa2UHqJ\nFIWIoKXCwvPnfSvegAdF+GU9nJA6YET4Iq0UvP8FyP5HZ6EVE9TS+DA3hmr+\nM8J3FGi7Pvku0YcQMZaS4IRIwmg/9dFLBHgi7+yRqfqrC02+vnSWA9EWM8qm\n2RGmlEGiWhjl8dFYofRwe7zfuYrYZ3Ek176YqmG8ciZkP7mA7DFWTsOLPCKm\n4XT8\r\n=G+4i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDpJlSUtABafv7Hqto2OH8lTlv4+h0oKqa09OCMlPiA8AiBA5+JF3bKZPD68XDenkR3UNPIq3SuinRa2LsCyTdxsjA=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1_1629196964632_0.1930569062486409"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1-rc.9":{"name":"ipfs-http-client","version":"52.0.1-rc.9","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.9+c1375617","ipfs-core-utils":"^0.10.1-rc.9+c1375617","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c1375617b6d7137e098375134097d61edf316ffa","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.1-rc.9","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-lRAU5MFmiTZXws2nb5jRP7NVWdoyk0qOdKqw2NqnBQIyFc42e1Iv2vIa3Ov6n99EgZVO2bCRUTjGB9JcihrYJg==","shasum":"88f53572156a01eec130e54f2ed42582eb209af8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1-rc.9.tgz","fileCount":445,"unpackedSize":548227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG5ThCRA9TVsSAnZWagAAYEwP/0/FugjCxdztKq9tSMjt\ngcJ/Mx5X9P7dV9k4t3P8HZGV95Kf+rCRFmNvCzdfi1GLOnI2qrsxpmgjtV31\nE10yCPHcmShTgb1vyoOhsCr76703zCf/8zWS1vvYqHibfAhzN53+PnTsRJUf\n4sTtPOHyF5m+g8AVrFPszS4wkngKSVIJvo+kbH+csqxCYE2xPw41pg8nmmDB\nJT/xJVakZfoVI+H7szvNZTxE2x82VDUZtCdY5uEYdYrK3HlphCARFKUG3qLW\nKliqJRkvIVWYb4XNWvxx0WKqccaMG1TjAk4ELENKpRy14XOuG98PAE5+s838\npWHpzcyHegGPgNCNlJX+qivtDoB6N1njxxDCeom1u/zoIbVkm3ZXfHJiwUiM\nnYvnPb7b/NDHUv3cRk6jUzmMcE6ZQ05bB0z1cGIsjyOAro6wggWOBM8pQGNH\nKGbgFyjAvg/+zlpJj6jSxrzFKajdrEH1lWvTkR7wJopaecA59YJX+6Ij3Sge\nT7pIRnmQ9oBIEvbO62BjN9G1U4Bqv7O3jTQ4iZJDpsDtA6uVrb0ToXkj3c6W\njcDdPRgHo1hMncfQVu4KxXh37CNapqvnDWNaI/1vDRMwl7PpNmvUNAAIRvjy\nhe0s/as9K/tUI/aLPoi2MU2lGezsGnc6+Nz7HOm9eSDVRFNFKBh39nC92ixN\nRKTM\r\n=3tGs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv39u2y5LzBU+GbOs9PjEF/QXPRskhdnVDnBQceLwGcgIhAP5YEHsSx8R1W31DwLrZ6XBJzDn4T0G3nsUYqpbL3hlu"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1-rc.9_1629197537285_0.8012051991189757"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.1-rc.10":{"name":"ipfs-http-client","version":"52.0.1-rc.10","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.10+2c1a23af","ipfs-core-utils":"^0.10.1-rc.10+2c1a23af","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"2c1a23af193a23c4a710a9007c7c22b4b729c7b3","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.1-rc.10","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-gM0Vat9wa6IbDw8Iq1RT3sgjag3krxiaT2RjwP2Gk5Fkusvz7vIGL55KbwpWsUv+SxZniploNWxUjBeHk3qylg==","shasum":"1820821146258843af5d551909657804e0dfe177","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.1-rc.10.tgz","fileCount":445,"unpackedSize":548230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG5j3CRA9TVsSAnZWagAAk+UP/i4NLNuo44Ze/wGgBXiq\naTUbmadYw0pbv37OMIwX2fJlToirPAES4k6XpJopTbU40ZzSYF3nTiXF/15x\n5kpbLrFnjPEO5u3Jk33p3zbVOqN2JnNfAy/v1txjzS8K6BAm6yEGWqs5gU07\ny8NOZzp4FvfBHp30ru61WRoEbJdhbW3Ss03BakqnHU6A2x/jQA2wdAHb/Ltz\npKbzuKVlhSZHRuyPFiqP9tkmQqs3zI+xOQeYhX6pG9pDJsgWRkN1pBQ/4yut\nu+Rh6U/tVq0mXtVN3x8gVjZKxvaY6bVsf7bueMLDRwK1n/M2B4O6+LPlzUA0\njXHxOriVTFij5qcsj/tUnRoXEjTVaK6PL6qlRNZKgdiMFjnh1qtBnwvOljwv\nZVKX1FxDSnb67AfiYIJi6dCoOb5+LjfS4M93AC/RZqUWjQr1IrqoOrW/oQcz\nJxTYyp7AheI2XOIOIzs4O6rgHzPl9hRFuwlFyJf2MWeLijX89N0zDfunHDGj\ngcTTdXAZQbm9na7XdFP8AXwtykE8exMo3oHC6as8/eAsxD70Fl6X2MxQJq9G\nYcNoD1Ul4cF8+OOd/uESRLPGwPqca5uKesyqO7HpktTYeirvEW8FfhqtQV16\nzNragElgZ7RX0dl4bnFumPlve7Y4fcK23DmRp89tYpwV3RkO6O2X1u4Qj78R\nEgp0\r\n=akgZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEuO5R6FEhJvJaDXvK7GAZ+IzPXuYXKPR/x4GCz02dJLAiB85s5Qqwfp/txyTHRf8Ic42p+AjyqJ1LQ3QRg2QafzYA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.1-rc.10_1629198582908_0.7361517050600543"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.2-rc.1":{"name":"ipfs-http-client","version":"52.0.2-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.12+438110ca","ipfs-core-utils":"^0.10.2-rc.1+438110ca","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"438110ca4bce91dc771eafd9d6589573801b16aa","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.2-rc.1","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-v8CbmYoYyXBFGTLBqSsqKJpdwraBReYt3LDXIDAGDPZGqtOX5LNI6NfCu8GY1fImsWKvO+8uhmzG2mJ2L2BETg==","shasum":"b9c4b3a9462938e003eebf0a7b2a4457a657e168","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.2-rc.1.tgz","fileCount":445,"unpackedSize":548535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG7HoCRA9TVsSAnZWagAASfoQAJzv65KASmS50VLzWiK9\nV/0AxmvkstYQ7a3TXph7JSuRDkaGUgv6BjFaNuzhsRwTaIhpB8zY5DTKPR/k\nh1aCmI6PvmUEfEwD1aLHkXDLl+JNGdmkUtsAB7xW1/q3puw1nOoo7sy2PSWm\nMO3Z5C7MqXgFoHT33ZmFz1apXPTSLgX2AebAzRK/NpmNVV90Q2IPde7sEUty\nvmMOA2O6CUm6uPPnJj671JjDVlW6vDemJB1IkF9O4aJeglY2DVa/vmNcS48Z\nwq6PnR24iip/Pv3j9p+shVUlHSZ4LpseskFceq8ZGh9THSoGX7iCuuEXCl8r\nA2+H9QYEL3wNauiegsxjASesjhprQB+FdfseMiY+wSYxgGsHEEf35G4hxGyi\ncjpwoamCNTo6NuRKc/FljSyI0xFI1Ac49tQcEc94c/RG+V1VZk1/gBPJzKZI\ndcUx91q9wbhP9lTkQGRfhd6ty4xz4Fk6PV5pT2vEFwFbwMAt6oxUyWHIoy6r\nXRD8y9nxXiNGCxRDSCLwEhFFsLSMJZcQZMYsuqJoVrLk8RN32EWzRneXrCk9\nU6Ymntoe/u07GTraDKHyNJzn6RtORKC8ADYbteTsgD2252EFDYafvKrkjM61\nMnPcZs7HK+2hsRxksGYz1ro/cNjkVNQfVOVaNDgavBUN8Qf/NJ8kQHoYuzoW\nboic\r\n=YCpk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN8SdOP9fAIWhXQ84IYMHl9sATCSHFPgOenhi+E4aeNQIgBxqNByH6PrVlIgZC+Bc8i3mTf2VeoGlu6HojcVkURzw="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.2-rc.1_1629204968662_0.8062773106093553"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.2-rc.4":{"name":"ipfs-http-client","version":"52.0.2-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.15+abcca045","ipfs-core-utils":"^0.10.2-rc.4+abcca045","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"abcca0453a2b769464a46b23d1f45319d62d0aec","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| -------- | -------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)  |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](/examples/http-client-browser-browserify) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\nintegrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\ncrossorigin=\"anonymous\"></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.2-rc.4","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-QRK1LxMkn8M5OTUjP+7GT+IqWktYYrZOOlIwOXl19g0gHVByNiGOb0PwzOG9jyB1O7mIRKN+eSAMYjQpxH+dHw==","shasum":"37f83551d0447d2cf86458bf19e1036e820776a8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.2-rc.4.tgz","fileCount":445,"unpackedSize":548535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHDBzCRA9TVsSAnZWagAAUXMP/RbkAFaTU7JjoBlh1rlz\nD99nAnYlNBLdph5b1wjvlazAWSEKH9AVpWLLsuwG2bILWitsogYsmnBm0dTP\nW8g5SpUP03MVRFaEE+PZPCdXQP9B/bsrDA2DzUhQWJJbiJfeXXnvEkoxU2Xx\nRypstaGTOl50cqed8aw2JF6U5/XjxmYOr6B7qUhGbhGRaIMybJsOvCLeOKgm\nnrAOxCw5ZdlOFR6nrIApBCNDbgq+wx6ITXQxKLP+3khdEAnuwXUIbKE6wtaG\n9JvUY4DvfPjanZe4Bat6cZVw0ZnTFFuVPDDjQT8R8p5M+hJa+UhsS61izhrk\nHijkwBdyhMC1+WvZ5oghIKUDi27hGj+t/h+ajMx0gcEMxDHSvVJ/d9KBe96n\nzYkufbOq+tRBSM1hQWOAMTOw32FRlNMAkooNRqbKXRjIMcSJI20a9snSSkJ9\ndVO6mIjn9xf+DVs1wUr5Tzd+KyTgYmKPfdOUQHdo+0Gk8lkZy748pv8Iv2ED\nf34DIyJc/eqiw3UwcclVh0xDdZ/LSSM0xdJSp9pA+CXIU5gRJntCZwJMQNvW\n5BcuoCc6JGy//OmpeIFVCANI+s7wS4vmqofpUyLLUUYSp8c9ixU6NMI1rCvi\nQkWaii/0Mx0exk4moZQaAZTtpMPQGwUGP5qxyA2z0H4IQqiZEIWilKfOuM1B\nhZMy\r\n=/gum\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3k6V3iZcBQ7eNVp0Qxfy7w4DuPeNxXN0qNBC6LAweoAiBkuDZiwXovA5PAUH2QqwZ56ImU/MFg9x1dHVcJOcJKww=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.2-rc.4_1629237362961_0.4574507451512124"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.2-rc.6":{"name":"ipfs-http-client","version":"52.0.2-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.17+beeeff01","ipfs-core-utils":"^0.10.2-rc.6+beeeff01","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^2.1.6"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"beeeff017ba49c3a171d8990389a67eb5c3103ae","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.2-rc.6","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-KVqynuV7phxB8di3yD6uMgAhHMHyqJcjizSTkx2Tldu4aHzeYaP82Nwy+RRULha9MgwwlbLkNN4ljMKPH8tMVQ==","shasum":"a77675862988b6f23a031b29adb78bb2afa43b15","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.2-rc.6.tgz","fileCount":445,"unpackedSize":550250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJfITCRA9TVsSAnZWagAAHMIP/jCrcyyHLNdb3W0Vdlom\nQALje7b+73f6JmIQOgQUEn2hi9N+V0fZ8Hfaz/h5h//sMZLsV+M8vJ0wECgd\ngjjGlTKVqXgh0NOVyIHnaI3J1Q1cNE5M0Ul7mUOY0clBZ4xnY7QOx6UOTSvJ\nECvqaGIMnMxBa6Wt0P6a2GhAwtWYnp1rzPH/bEKwtwGdha+IVXWG4W+Notwo\nNujBdFwdNfPVLXqRRIecvqNEO0Q6QSds2h0G5Pfesvz/55I5yQ7+gDWm19xj\nrHVsWSMsJVaqDx0CjF5eFyI5LmCDV5lZxmMNfu8+c4GPInF+vzHu1ZYUpQvh\nwIDejBfriLgnduGdzcRpqjMJUEzeU2rhIU5gOjuBUSH2ivKG0XBIOQZ74yh8\nBr25x6pQzO5wOI/lGtfm/gvgABTbDDrk7N2bOMrwSncPDyyO/AeLSJ6vdHlV\nkURGbWctCjtiSvD9jzffOaSD78Izzbt7I0g8+iul0dzfABh3H/ziYFi3j4WD\nMM1hVJZpLvk0lgd41YC/tBRppDSdV1rVZRQrQJKmiEb/J+go7OYIFnq7hEh2\naoe5AytZPbPRV3QObF43R2kS+UW4KCFmRpdEqX80C1P1aui9qUPzWogoQedG\nRmBAnK3111/dWpiv3NM+c9ABYEzCqcTq+Lq9kZHEdc+KbI1vfnv3Uky7iciy\nkl1O\r\n=9TT5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSQem+Ql44GeFQRGTSuve1sMWdqIrVSNME3XFkq5sL1QIhAOMxhIDMCOuJw5OREEj47XlBccZnG9yWtW0UfdrOQBwm"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.2-rc.6_1629876755621_0.07582683773016186"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.2-rc.7":{"name":"ipfs-http-client","version":"52.0.2-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.18+aded7dcd","ipfs-core-utils":"^0.10.2-rc.7+aded7dcd","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"aded7dcd65896586bd46024bdb562c9646056b7a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.2-rc.7","_nodeVersion":"14.17.5","_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","dist":{"integrity":"sha512-WgtGTumhCJvyDtBUMJrQegOezkZiUdor9gCzLFVODLi+Wve3N+ek0Y/9pg7WurRZZ1jEsuuiQSSVoNdW4v40Sw==","shasum":"3098f473caaea91a1896ad95bfe57a3275c97d30","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.2-rc.7.tgz","fileCount":445,"unpackedSize":549516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJgTvCRA9TVsSAnZWagAA3X0P/RJFbft2SYhfZxd3pxwD\n367yUq97Q8PVqX4W+utRN8C7PBo3uciAchTwIcWM1uDp3bwfUofiKKU/FYh+\nXLsGldK4FJXQwE8y6FkUcJswzSLZqdxDOVcx559c2o395c24n55atMJTJ/ST\n06te2Xu9USHyYIS4teVT+HE0buAs2ALXa/FBc55oa06iwKlJAYaERpsMgNPK\nadtE86aGR+D3Uw9VfZaQ3mIPqSihzaRNjce66borHL53GSGI/BN+yFLzgS/d\ng8AznOPE31Nj4DzfM2FMZU8DmFJOLO9JBzQ+hf7r4QcAs+kNNpMWzTk2j3ve\nGWmz52MQ9P6BWyG4DqVETCPUdJYd/rVEuowFrgwfdVWbeBkYkLTJUNk4IELs\n5ng/dWjnTv/tLXPiM65k6uq/4vqfHA0LfwrkW9U7Oh8i1LvX/5ZqQJZeSdWV\nYboNB9qsH5A+rLePiq9RGekuWW450TOK2hY8oTee3qBgjI0dQdVPEybxcqPw\nxn6c2k9x96tdimqyDuMURJPevNitlZGELtcANEHPdCl4WJ1X8CjdRYIjAMZd\n1iqv2UtcMT4javbPDLEhuNBmlcH5UEK31cAKljXDCeiiezbNQFDCR5NxgC/C\n9pziNhvk/HEznbACcPDsfU0g1Xgk8p2gTblulqpJ/3OZnKoPTfQLsyVmtstD\nXfch\r\n=j31o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeIM99+94jfchGX6w5q8+hFVeup9ApkaUEYimrOmxaJwIhAMLSELCut0oPNaRa2KQ8oTtdl8khcsc3Fa18Z3j0xQx+"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.2-rc.7_1629881583481_0.11770303224941792"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.2":{"name":"ipfs-http-client","version":"52.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.0","ipfs-core-utils":"^0.10.2","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6ad2b40be914098981a2dbd370396599a918d0ee","_id":"ipfs-http-client@52.0.2","_nodeVersion":"16.7.0","_npmVersion":"lerna/3.22.1/node@v16.7.0+x64 (darwin)","dist":{"integrity":"sha512-KdtKqGxu3AvfrButz1RVTwcaAgk09ageelQeEFDjknNIZYmOHi1TdC2r2rnf9sbPuyPqM20OTVtsXb/OSc0iYg==","shasum":"29345d95680deb6df40a4fb7a7616b54b8f9906b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.2.tgz","fileCount":446,"unpackedSize":555800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJmgpCRA9TVsSAnZWagAA/lUP/RoFcbYOp773o3hoou2Y\nKE+SF5talkTpwCARAxDtuM5o1r2mjBt2F7gtC0zr6dXj5SiopBjQZTw4N2mO\nlS/BqHa8e1AZnq5/xgrazmif55Q3pgSsDomndz0JL1qh10ae8p8EGH8WQN1o\nUa2bo4Xkx8j7Z3Pod1IlOLD1J4PgMMKKcqOhwoIUEgwAsHD+9sayFEeItzd+\ndfeycu8mYrW5M34XQi/THKwjXjaf0Bb8Ok3zJI2qH30wDEfSLRz59lCo7LZV\nQT9xGK/qXVkINum/38LZwpZSsILvXraivat+ngHU5tt52CRdPxnOXKGw9wRy\n748l7OfBBKP8thZKN68afWm5clQCjM6hsNqtzhP9IOrk0sa5pJA23pVd9vIx\n7Gg9ba7iTqX/OPyNt6tpul3A+zIvKdv07K//LnspbzNIulR7tA0LhdUDBEwU\nW22gY4RxwmY5EZYc7/wheQ0QsOGD9s21R1CFBZR7I20xNLyHKTSwvuTVLKVp\n1s59HwpBgdLLE422WfSjtjNl0AVmBdP6NOr19ir5yv4eCYZKZfkDVo9DgfCs\n++KEyjsOFpExX6GohvMKtuNrG4ShRwBM4F79ayO/d1lx4kgHkvvMb3Zcog3U\nnk9cK0GPljq1zjn3Yc1DW8LtMqWvbZiyL0P4IoyeHHfWJhMATEn18UbyRCeI\nICWb\r\n=bFSt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKgeHP45FAegMIC+nEbZ7gcq48Yqsq9voykw3eMXKmQwIgSjjGJjkB+iW9warwVTL0iVbKN/9xRb/lXSeO0g2n24g="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.2_1629906985291_0.8517834919731657"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.2":{"name":"ipfs-http-client","version":"52.0.3-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.25+ebb6c552","ipfs-core-utils":"^0.10.3-rc.2+ebb6c552","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"ebb6c5528eee66d07ee64c4ce105e9b1228cf857","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.2","_nodeVersion":"16.8.0","_npmVersion":"lerna/3.22.1/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-CuBYyDvJBztPUKdxz04+QDLnHXvT/oUYJk0hS99jt5dlapI4N16+nGQ2n9a0xM4aaaYSs/Yq+wFLvNG3Vei6xg==","shasum":"3834d7caa3f905030fcd6694719717b490fb8ac1","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.2.tgz","fileCount":445,"unpackedSize":549695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ2NoCRA9TVsSAnZWagAAbXYP/0Y4FZRQal5jnJ2qy7aJ\nabIXr0UKmd8O9KgL0onwyoYAAiywGgdDGQyotwi7RDOCjyVtYBldW6MpgQRx\nMHdBD2hjAKFF+vDVHEY0HLEPJ1vhdV4MPrxnBMQbl8mDvGU6DrTl4ftq5QTJ\njIfUo6WoyfwdrWT+sSX/wer8Zu4jgfpRfrLKLL8hWQY2k7FteDrawYYhRCjB\naWJglXU/anjW5xlsrIAKFMM3bGePPut4+9ilQQa25tvkbd21+vKZKNAmJytL\nD4bRTqW9bn3vkAxsC1ALKRq9zr2/WFgJoR8zEuOR4PE7bs0Yc9crUrT/bX43\nFlq8lRohiYzje9137WFS1K2Vmvg38eZXj+KRUqSgp3Vvbl/C4ji1sFeNo9ad\nifSnw0MBt1F10GXKDqYCS3xJnvCkOd7gFYpgiCtyh3iIpHKdUkfT1RYHL3EL\nKIFn/aS7jVtRFnOgMu2hlxKpZqDthlnGAjl9GDr3oipRLMv3YzqMmiYO1UDs\nBHT2O0Za7GAUHKSAakmI/oYJGZ0JXQ0XF1BuQ3395JpAhwpx3jSbIynX7zBv\n2H8ts7Cit1yEKHv00VeY2TNNe7+Zdja/YiQOmzCcq44uEMHaBmRkK3tfwaIY\ngwb0I8Shan5RaEbS8uGzEZMRTCf+K7HqTDnOUlMCHC3EiqBXjqKrXyROFXHS\nMGXQ\r\n=DGsN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDzKEbSH89SgW7y+aTo7ui4SWN5aDiP2Kme/BZ8xln4uAiBxhbxtkqKZRYD9GoK1/U+A24L+uWAaLyT3QsX73P6l9g=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.2_1629971304477_0.5793575381251623"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.3":{"name":"ipfs-http-client","version":"52.0.3-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.26+6c46a3cd","ipfs-core-utils":"^0.10.3-rc.3+6c46a3cd","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^34.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6c46a3cdaf6e9f8756632e501019923a01503282","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.3","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-8X3NQoh+dXk+Mf/FZKLxP+RxWpas7YZ/2dsoGyy26dnfFf1r/Q89BAnw7+QjZgDgyhbKhMSNTLAlfaqRlh6C3w==","shasum":"4ba0ea9091e1a59dbd926ff15059d813d1462c73","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.3.tgz","fileCount":444,"unpackedSize":459153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ3aUCRA9TVsSAnZWagAACJMP/iW7So0haJLCx4HP19Ko\nCmP8VN5B5lgfv9606WKz5vqVvl4i5YYIO5yZQ966AwFr7uyhC+61kZpwZvk1\nVSCVsltKi+wdzU6jNoJZO2nIy+zX0k2tCmYZb0HI+w9CEsH67pWoIrhci+CS\nsQFSBa8RB3cHOVEAq3luq7lBf/L+bvja3Dyu+kVEopaCSWKQ+0BiXIHzc2uV\nLWMhuq2uSB7jiiYsh3TfTBYPFA8jLXLgHBPS3qipdicYbb5+a9VNgdaNbEio\noXNQCmjD63nVE+2gZ/Jx10vy2nPKo59srKEtqKZEv4A1AAQUU2iyvEPrMxt4\nSibx2w6SQiuc27uSuCD8oUbAjFUoaZzQssx4ZxDx0ZrDMu5iikmt+f1AVBXi\nRhlRsFdZPLZ4Oun5+6hZmi/xomYgMf9Co3esqZ2UImXcWh4g+GiqA/PLjItg\nEEY3ZJNGqctocQ4l8FNcRS45Ju+xdRgdNlnZyCoEg+9CxSsQ7UiUxzO+6PY1\n1l+0PLhdquaBiBMorQnhC6LIwih4CetUxhO5+2K5oq3EZaXGXYomSawhEtT/\n6KKDzKkSy7/D79JGZ38JXQKHEPLOa4Aj1ryN1cZICGesb+1Bh5hg8ujyGJw1\nA1CQ0rZnS4G6E4PZFEKtxQikZqi/EIuUCwzdmZAr1wx+ZbqqxNT7OMpji2hf\nIBYN\r\n=V9Xk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNdxAp8UNodQ69Kcdi0WZYBt0LsbixG//I5D8q+epHVwIgXuFPLYhZ9kNisvUlc1Wspgj8GVt6nWjRSyMmnwMF5zE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.3_1629976212666_0.5102755252166522"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.4":{"name":"ipfs-http-client","version":"52.0.3-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.27+1ae25d01","ipfs-core-utils":"^0.10.3-rc.4+1ae25d01","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1ae25d01d93d192d8242c7ee48ba338064ac9e03","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.4","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-X4j947YWgrRx9cWY0q2y9XIFhx04FbayAycBan9JJgXcUeLMXahJyfqVbiKcJT2s++W3bXvHiW38CD5WShQHMA==","shasum":"0fe5838a82e63c9a21aaccd26c0710348f67405e","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.4.tgz","fileCount":444,"unpackedSize":459153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ54ACRA9TVsSAnZWagAAETMP+QEA826JqYIZirtZ2orJ\nfvUxcNlHYEHqkk0gEYNOMF5ZMDIZXrzblRcLAbqTCr6abjxX/sxjCKws2XdV\nP5bGVBNys/MxO4R8Vy7qK+nZoTovJK88ZnfOJ7Qi0Ed6TwSzGP3kdLkqB/uu\nyC1HRSzj4tXCgw0HugVH6F8rgp8f3auHG4Dt4hkWW1GcncY8i4s3EIBpReJ7\n5rdCJjNPzr+VaaIlYsqPEfTpu6LQC1e54FKLJbHXXZWzAtUajxTQoSUO215+\nWswejnLC6HWsub99ncZZJ8pKxXQLLiLmc67wkNea0mCg3NGw0TfgMYtLMXFY\nLFuc/ZWXWBeiaweEEvjCCsLP2xNMYFiuHA/67rZh5IfPVLalxJT7vfb8YvGM\nEMGwk7i8/ZQZt4R8LhBlT0A+VVre1Onac7vTsz8UbhvtFVqzuMYu+69iSlL5\njlqBXbLWZLCDGZEFe5eFLxtb+0XIc3RgyRpwh6reZJjaq5x36VIml5cXI8x+\nld/8mTbTLERrvjHh+nrCZJpawdiFaCx4/gma8LhIZ5jSJ8wIql3z6QbbQcOz\nivPXzb8OzTpe6sFw7x2PNV0pIwAlbaf47lZoNQtYqXLDtkXT7G9X6sc58ZOC\npSurtjJzB89GrBjKxC8cnMadtIAhlyb9VhXC+0tZJHhWUGhh4SaPobRNYq9r\npB0S\r\n=9yDz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlKTfa27rizHT1MNLuQMkYERGKqpm8Dul7B55rAypEggIgQGCSzKXpCgqzXZDhNDSCGxqu4N6It0HM+bHmGt2kGRg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.4_1629986303932_0.5359806004097487"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.5":{"name":"ipfs-http-client","version":"52.0.3-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.28+6737f38a","ipfs-core-utils":"^0.10.3-rc.5+6737f38a","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6737f38a27cfd7a7fc44afeedb1a7465cb17a3c9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.5","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-nlmjeRIco+jUL9CNoOAzjOACoK4HwNiPiAEA4DdRfzch/KPwIoCMFZyCmdPLqvSAU9f+Hb0WDiCXpinJH0a41A==","shasum":"a8dddf5ea778e7e15e78c16c17d73797575f5d60","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.5.tgz","fileCount":444,"unpackedSize":459153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ7aUCRA9TVsSAnZWagAAwcMP/2jlr3ke6HuyEuJAxle+\n31xiHOXDGYo1wYDCmd4qdALERoJq+ZBLID/BQeRV0t7aOVX8jbZ1XiEMjZfs\nx14SygsKOLLQbbP2eymZHiHYjQrB3h1rajV8UTHeEUD7s1wcZiRfXoNAE6l7\nDP18BWq7MXoK7ifN6RrMesVVgx2hJZH3Mm9ho4DKpMO9eryo5VoiIoe4iBOb\nyKFjTHA1yQ+PmBjk1OZcN3xQAeV2C7wNbXvcgDFe9EBZOKww952Xq83zqlqQ\nyD7QuKYINUD/7hJNojjCKfNqruuRLpKWsAhD4kdW0C/Ey0Mnq7GiliL5645Y\nREkrwNQbTaOBo4lJvNs6oe6RycGhAoD/wtFhn/RQV8lHQ68NG1+Ij+3f9J1c\n6IPZxa4nym76BY251kBBHrygiEAg1JCVPf7NeQdKq7P5OY2Hj7RLD4fGK9nA\nZSRH9S3UAdJbOYKlJMcntoGQC9igJJAGF2QVqzasfGk9JPUJNO2g/GHmVd17\nt1DfTEP9SWRqwvpX346df0yJIkJ+QEYSHqwqFNmSlxrK4bzh8ovHy8G1wywZ\nLOlD49NrQjjgtKk4K6HRrhZqVpLkYa2QXTfGp+Y3K+hAWY2Thbfn9Izocqft\ntkrLUpTOtyRpZIcdsmXVMlLbGfw5iTmoLoT7UHPxeZ09VimEx0SajNNe/tx5\nrX2R\r\n=Qzre\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDizz48F7s92oIPp8tClnEaCJjWGf748jyPZIxFuryoIQIhAIpSHt6efPutdNkGd4eMTVgJEU0rP0qeGZ6haqlMYU6T"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.5_1629992596573_0.10679453296700414"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.6":{"name":"ipfs-http-client","version":"52.0.3-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.29+100f54f5","ipfs-core-utils":"^0.10.3-rc.6+100f54f5","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"100f54f5b6e29ff64d9afb9c2c326707c5097cb5","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.6","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-DznMQ/e6rq36GUsw5EXrBDOsiKjWdUibjd8J2kncbyF4l9dB0L/9vTk3s15BRX/jUxcKCeiRaKaXABXGWfL2ZA==","shasum":"27babe65de9a2e1d050b8bba51778336afc77a62","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.6.tgz","fileCount":445,"unpackedSize":462401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLjAHCRA9TVsSAnZWagAAuXIP/0dKglPyXLMfBNhpYwZ+\nrSaEaxFw1qi/TW5V/PUeIk1VFV3WbYXbQuZpsbuKGykgS7QA82On9l4yh53Q\nMedY/L4cIIUS0++CbGa97k1G4BDorFwwxm/wlq61uhg9YH2c59+eyqiMQM+c\nrsuzPPxw8sckzeKuW4qsfcuDFG9K5WGpDYV5LpZ5aDze1CBEggv6ze1dW1gJ\nHeJXEnYS45VPs/IdAmYmwvVJt/yonq0tVNVm8LP5FiW2K9G7gdwauZFUcSLm\n3NlVkthloB1scxEl4jWT67GqYSdzFDSdLUk8aVJ7f63lZKZt1NRSeH5f+L5f\nfjPyvCYh1MhEnjc7mG8E2XF+RLOkV+0hIqW65oc3dcGBNAe04ftIMw459KDY\noXXSDUMs0aF0gFEsvcvPxCo4cU/CBokstONyQpJRyDoc6ueqUIs/P99c2KLb\ngb3aM83DZ5Dfd3C4RVPRbscLXdMzhVbqwVBGU5Q2ahbSJrr/xrjcyNXavfPg\nONrqViib2103KPxo5yudiWgTdJUCYpa3G5Uw1wRYPVu4GWuw4GboiFT9xp4V\n7dJMrAMMy/ph7oB2kFY4G5eG34yO0y+AM1OA1FPP/EARpFeKoLr5nWjD9k6q\nLiB55r2VZrRaXWLKyKx2hnEVIT60aKlso+b33hnK8PvQw+vFhcuXIvQcNR+r\n4LOr\r\n=y4u7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDxyZ7sgTdsffbfjFZJxA6hV8c0cgKdvTJtTau0x/F5AiATdttp9afYG5zlONLd9uOEgLzXsDu32GIFf8MAy6IOeg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.6_1630416903592_0.0030948284864287245"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.7":{"name":"ipfs-http-client","version":"52.0.3-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.30+be900895","ipfs-core-utils":"^0.10.3-rc.7+be900895","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"be90089554b3ff3d7adb02e76076e5cfa1d82572","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.7","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-+Adz18OcD2Ryk3C+cSgwjgVd8MN8skom1jNKHxuMtFDPZKUkRmfE2ZDdGpbbgxKWzYc8gVm6PfK06CMxT71pKQ==","shasum":"3c32e7fc5749da282e7f630fff683fb442a0cf9b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.7.tgz","fileCount":445,"unpackedSize":457807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMOb1CRA9TVsSAnZWagAADTEP/iYUX9BSD3X7P+Rf0j3F\nd6GOtyTmusm+PrGQaaN/DKikY69a0dRxbpRcPtKNb5lGbnFPg73ZwrZRYaoV\n6mVtQyRs7okfr7iY2dYoP3CNUVDxa+AjAnV4nmzQ43Ugzg6MoFivhlj81KwV\nDLNznK5GFFQxJc9lEEPLZWDRUjqt40vRYeTWSFmkYByB/oxilKUTT5mB+maU\nG5XvFpg6DQlub7YoUaYkC9hw0pbBS3ABcMuj0MAJugzHLGKn+c+oVgM+JUDD\nTjPlfkGOSVVqJP0dPUhHRNZ/A6mvYUy6nayGnDxEqD0DqUyg/y9mT3GYj5+1\n1Visxkvg5XNd9PUcIlerZsp1GcOEyaTYE9LoP4dObvm55KTrKykjPGxVrGJa\nDWKyhSYgRnnDaz6itLCBN2SjP6gTeqOsrZoAJjv2/B0SH8SeEi7gGe8hZhbD\n7Lvh5HgW8Ml9p+QdCFEg8dbBzj72ncKuKIulcpm5UiLPKK5THLeKZUjge2Bn\nEijRRW1mYWn8Cfy22rngrs+TTi6dTwn+sbd3iqPz/PU0O8+Wh22YW0AHkYuW\np+jicp1+wqZE/LiPA/m8DGXwpngP9yzlhqTeTfjSdrVR04Szb/jXn/DezjQ4\nRJr9d08tznam7uP/NI1jdaW4XsGgb4Jy8Zdvq9HuAtmDgYSqsqNg9SHKiji8\n5GfC\r\n=1a9r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJFWi0vpdKJXC/U/l428pRTq+Lq7ALeAq3xyp2GurK8gIhAI7Z2CFRvq6G/NAc04tnC+cSKgxXthvuJZquuLqx9y6X"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.7_1630594805509_0.6522883654157567"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3-rc.8":{"name":"ipfs-http-client","version":"52.0.3-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1-rc.31+c4f96fac","ipfs-core-utils":"^0.10.3-rc.8+c4f96fac","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.2","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c4f96faca331a2e0db2d6de35a804bf2b9457c80","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.3-rc.8","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-t8E8N6o5LCR0mprcW/IakojxHIJi1ve5l5czgg7AcBF3iXSa/mDTlRRvgPLXQaG7C0onfyRg/KYkKGbIcJLDPQ==","shasum":"986790744abad08aa2b26d554efb22c35807e2ff","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3-rc.8.tgz","fileCount":445,"unpackedSize":457807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMQw4CRA9TVsSAnZWagAAqPAQAJ7RBIrF99qKtDbvulva\nBf26CweJc4tyECRtrx/PuIVDIf59lzP0HwqfgK+XYemeKLr+qVozJ//HWLnL\n+JfL1OuUFTBk9a7kjSS7R1G/gNqjy2GUiBfWHfUoCbIYn6UX/X6tDrYyx/Hx\n1A4tJ6PaAeBWrSW/FP2Tdssw/BCrOjzH/nX1TxWwRmhRBTRH7hX81g8dfgQU\nKG4IVEVBt+CzS7gYxpcUKHBNoZQ5oxwy5BhXlcmUoy95C1L23LwGgl/81XWH\nNqtwsiYko5oJIJHY4S18a0we47GSZcmF3nVZklRRvEt4dW/EChVMjIdPSelE\nTasFS+7PHhr/JP1P4I4kb/gdiU1x5+rUmsizQ5wHVOmm/TTy/Cnxta+SXRah\nr6Nw2wbDaT7lpUl8wc007EMg9wRnlCchswUfhHLNYXuy3/qwnXehONiKqhxj\nCE1DLOECb3LH+MZ2yN115M6hA7lIl7Hq35M6Rkr/CM5XYFhUECS80EHGze/B\nffNHGURxpqASmFfyAKSUuSafBh3T4U5D+2x1Upf4gbhFPULQeiDFvepXFNv/\nghr+wq702bLz5v7dtuMtpVLl3l5XrAamymJjN92O2MLDjExx2oBWmL57foQZ\nkQXMeaRcI8bDfjoaeeyckDyo0zA5i++vcjb4bNZTglLrwdxGtefziedlHnwH\n0Vi4\r\n=XeX5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMlO/TLDDSlDL8wVV+MKY7tiUISYbewHMUMTqGHi9IIAiEA6WGO5gmo5T+YchpzZLiEMycho7yHfic0MoJnnUoVtY8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3-rc.8_1630604344372_0.09348674590002681"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.3":{"name":"ipfs-http-client","version":"52.0.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.1","ipfs-core-utils":"^0.10.3","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"9d92e8079694dfbc7be262021cb9d41e6c5e2c07","_id":"ipfs-http-client@52.0.3","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-pMLDTz54MIUQk+9N4huSzMBfp+Gg33sk69nm6uaHfyO91InbFSlerwXL31CplpqRXW9vIjk8Jl4X1ZgMLnfs+w==","shasum":"359ff558adf4d92421cfb0e9e58f3b934ed124f5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.3.tgz","fileCount":445,"unpackedSize":456128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMRWkCRA9TVsSAnZWagAA9wkP/RnB0IVDmEYlPiS0OP06\nhEB3hXcPpsIWXcwRzCFxz8qwrqY4tuc2cFpBWFu2Rk6FQV3bJYYvW/lzW9LV\nMSKontONerrw3Wqu21kyhhD/JxcpNlYPpZXpXpAExI0FmYnHERwylqdwTxrV\nHWwNcDLVbILTR3rYhV6DDIvzV8gQJiXoOdGUHZ0Pq9wV5DDa5yP0uQ5A3I9u\npWT5d5+PTzNk3SxmfhWUoPcIceVMy/4Xy/dtno8TicOYydf9b7VjWogdk+CO\nhE8tOPRR+5PqfJPSJ5RaZgoY5sDN7LPbCZktHf94sIhO2BtpY5T6eR/1n6i/\n+Ruxb9pYXV4DbSsTdqwAj4LAaRM7jqo4aERct/F4AZSXtPlHva5EufMo7bde\nZ1hVhj+JE/PNBISEx7v26l6dFsz/qMv+tmBx4KwcEtFVI1hdPoHiN0TghtrK\nhvPG6AXocQN1bvJOJ2wQTDOzsWqPRxeaSK3HBs3zUTN+2L/zPmsElJAsXg1X\nHX0hjzo7OIY9Npl5EjcVLdQU+bYbJf9m9Hm/aD58N09IckclAjFs3AgSk/j3\nFRn3/g8XUN3Jgj0ISe95iXKv2DWI1ad09SVsgUvs4ozsDu37gtjsMSO3auWP\n5cgTpoy8qIht0NsM2Jthafo9EK5wKl3fbBS5C4J0t1y/ckqDHVwYy4i57s/Q\n21Ea\r\n=WBd2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTBsmsirD+UKoGFKV7xo8xHP6nUH+88bLq2vNyZC371AiEA3Z1K+LaH/wy0j665NjWwDWom79NMaAOu5NEWNzADwW0="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.3_1630606756051_0.47336924465474484"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4-rc.1":{"name":"ipfs-http-client","version":"52.0.4-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2-rc.1+5cd78e56","ipfs-core-utils":"^0.10.4-rc.1+5cd78e56","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5cd78e56b8344b3f71fc7c578c4a50d92c25f0e8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.4-rc.1","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-g8wduZZyIG+oReSOsoV7j9iLd6KJOPCb4eaJUBkC7Yc11HJk07uggEJwMBFJdzEMhuexik0+/P1ehPDgO3D2BQ==","shasum":"c4bd215a2ede7512f323d186ce7404f4ff7db42f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4-rc.1.tgz","fileCount":445,"unpackedSize":457485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNfkqCRA9TVsSAnZWagAAhZsP/Rv9hKLoQRZOXp6Lo7g4\ntPbog34P7C65lokGbenSmW6KP5j6X+kdsMmbbp+gw8QJK0p8g2m53NJC/0yo\nsXF60yht/07dc7mrsJCBfMAI9DX3Yt42fdSUKESkcfoZaQBwIzawuuNn4j16\nCWb7Y02alwbHRr9WHljiiwtnG1uzxf13z0QvCu0SS9WNzdjjdCmWiJRPnj6d\nNz5sutyzvjK6bCMmdEQdjqV2JDHS8YyCgRgIEcx87fONunmsLTuMSlKHpEJi\niXCoGR2fM6wNv/LZWPM9MNScnGOtr+ZJvP/Y7hHMx890xYUHNjxj3ksGUwkh\nlQESJcrVfw0+0DLUa5wzUcLdhlwv+/y2M3BUASXmsoi0KCAcMQpjLHCMob2P\nKURjYZkbTXyxLFzpBqNE9h6scoPIx9vdKUPC9QBX7pgky29HCU1lqDqcazNF\nIOvNvnQHTNrIjk4ouPg0Fj6g05NRFqP70oYtSIikWKfjorACJCjcMwUty1za\nx2ydFDmRzrXXEuJpWe0HZEvURtKW3ARqncg1VWPlEnoTtGqEimIJPXq4KD2T\nI7z/myfObisftdHatky3dhC8XI8iyE05qeyy8+5cBmI33RNfxU2ZogQN2Vyw\nXEkJdVDyaq/y7Jvra38S+KWavbNzPi+NfxIFp172Om1NvH9ivkpHsdiRp6+d\nkjSu\r\n=fxM8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxJ8gmf6sxsABgyTQkHWunslJsGQttudM7jika8PTfewIhAJnGNdOPHM3w+CQ7ykZSC8Z5UuNclq/rD8xEbE+f8ei8"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4-rc.1_1630927145997_0.2727522619986593"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4-rc.2":{"name":"ipfs-http-client","version":"52.0.4-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2-rc.2+2be33543","ipfs-core-utils":"^0.10.4-rc.2+2be33543","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"2be33543a07c14a604fd484a481032dd75fd8235","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.4-rc.2","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (linux)","dist":{"integrity":"sha512-W3pcOECDq/xVWKnesmqyABqCcMfCGIgYy/Oy277AOxhD1cHvrHMPwhdvy6S4rg2nUD75h50/gWXDj+HBJZfQQw==","shasum":"e9ba2581df10bc5a0dd0156014bd875ea898e5b3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4-rc.2.tgz","fileCount":445,"unpackedSize":457485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNi10CRA9TVsSAnZWagAAuSkP/jqIrbj9RFYnlMpcM5ZQ\nI1ogexjdBCnJ7OzI374E++2ZoOpdYj+2WLoiKHWOhqHijI/Lrko5dUjcd9TQ\nRmOSEwo3hI2LepLypRbu8o/pIFGAdvYrF6S8icXc0yLvxKf7+42SKbfriut+\nqzFZAVGipKi2XUnb9InLdNbUkUjP1Y9QGsWhaSAp4lGyCEVsFq09TnYTrkWK\nXLer38ID0/7ynk6zqCm45DRpAQdLTxlMBdiQyC6LruVcv+9XWNxjyZr8TAOA\nTJ2FlLQmQK4/bPiGh13XHXJx3ShIzgAI/G4NVSb7BCTcvazWuJt4HP7zN4Qn\n/aIoOeKdXXQ5JaHDquqxPZnGcrFOfxCVkngnhoxU0aC9SeTzzk+TLcVKdo09\nofDA+Mch1e3Ovdc0efHN60HN2IUi2l/vZXZYlumPpc28+9/1zLvA0OySqATP\nVuFPcZTWYjwcK9xwcOcTKO0Ijnb5vVmmgP782e0KRLZlo5Zqzj9saxrWMyZ7\nev0Rkf7zjhXtFERNU6QdpbA5Rls+5THj/H1WBBjxOI1+u9SBJSv+S0lMKRce\n2Ru9brkXN3tktcqJGbLMCWF3y4H7KPdtoVjtwI131TR3pRw6gTlAwcRL/klr\nkzyVwAcHXbhMn7qaqyHR9HMUwvcBf4ti+ztRl14Wc4Q/7+MbTRmcz1kcOmws\nmCrM\r\n=E5SL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzt5i16Km+qfnG5MA/CAxsuGH6wRudXcUhTewOtbfDpgIgRSnTkTBrCKeRBpKrYmBKhe7qNvFL3Z/gH89ZrX6iDCY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4-rc.2_1630940532379_0.23722329152179444"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4-rc.4":{"name":"ipfs-http-client","version":"52.0.4-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2-rc.4+84c772ce","ipfs-core-utils":"^0.10.4-rc.4+84c772ce","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"84c772cecffaf4deaf967c0c4e9d49c3dda73237","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.4-rc.4","_nodeVersion":"16.9.0","_npmVersion":"lerna/4.0.0/node@v16.9.0+x64 (linux)","dist":{"integrity":"sha512-bvA8wefOjClWSAHafUBse7ictdlKzm5WbEMFfr9JdtUpxGAvxyVuna/QqKWivlG7GEKw66FaHAy6605N2yeEZw==","shasum":"cf4fbbc3accd51c7802e3f8aa5eec4ca1ac5e5e8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4-rc.4.tgz","fileCount":445,"unpackedSize":457485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN5t4CRA9TVsSAnZWagAAN98P/3k98tsA1oioF47NbcsJ\nvED2YGy/plK5eATPa6kdAyaPOUQ9jv8n3PlKBs7qCGC2BnlHwU1fsFd8Tu6h\ns0mykd6HClhZd3G3R0AVj2EpekHBW78KNRfaWyWUfMl0MUA5ugYlxFPwuNIY\nMg8sZV9xr9fgv3gNEOdarb2Pp68ACctVeIIIZCzoQSWWtdP2qoHyx2kljVI0\n1Tr1F+2KCIqy6PKeeYVYCcwka7myYogETyNopg1SxSrIxdYtamKPphqMYDmP\nlKdQQ12r5uw+2G+f9cunU7Xmi+oIkkAgRnaR7WfDqUkZuk2hj0oR1eWDfARR\nfWfUnpUfrnFt/zPtoHSFqGmnseuUK8uFFicyevVJvbQeE68dMjsDdZ+vxKaa\nWneHAGWvwC7o6fdovVpRVoTA4NXptyITKv6kmK//1gN6RnQCwvf40c4WApu7\nEg/sMuFkebf0ldzaq1DLxzA5sVrhRZNO2iqWYUiGZrdO63HrkxLTxDYSRl8N\nrwmXL2KhKU22ETDuz1ks4+HT13CX/3f8P0l7orLhiAXop4+udL9uTA8GQRa9\nTKKSZcsWTs3/tNz7ydyTGjFWjQCCW73KWZgSlXxoMoha3vnCfwaDUgMDg/gS\nSBNs9VA2gamNo72uLjTkYnAaexTJAaQM/WU5/6UP0IPaYOOp1W2+3r40/mze\nSRkD\r\n=KdWC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDPGjHsFCbqRitleV+PXIQmtxuXkXy/LB13EOYpnZMfAiAQtj8ElWGvFjf0VjAdd8k9dKujbqLJ90VPyhhmXZstZA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4-rc.4_1631034232693_0.020296085422290444"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4-rc.5":{"name":"ipfs-http-client","version":"52.0.4-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2-rc.5+b072ef16","ipfs-core-utils":"^0.10.4-rc.5+b072ef16","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b072ef1635759a3d64e02afd7a6d853a94cc06a5","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.4-rc.5","_nodeVersion":"16.9.0","_npmVersion":"lerna/4.0.0/node@v16.9.0+x64 (linux)","dist":{"integrity":"sha512-LLCrhDtc77TX2LuVwoI/XJ7IcSAM3Tz6EbJ4ZcrwPy/WKzYA33gSk+7g0a1wSHpyDgUSeaBhrGQ+j5eodwDQaQ==","shasum":"cdadb152db2f5726a6e111045cede13d565fa0bd","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4-rc.5.tgz","fileCount":445,"unpackedSize":457485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOINrCRA9TVsSAnZWagAAgtkP/jXrqhuCIRB8Vrjz8UVp\niIp2ISM97aeJalBEKxAtEpGM2TXlQrsAG4vFBBb7olw1f8t1QC3yRxrOTQ+p\nJSSpWH+5YbgF0mpjmh/GniQmqvfl1AdwD+ki4zsmnrH0Y0IKLFdeMMO1GbmO\nucUIBkwa+QUZuXtn4pr3t85d0kd+hp3mi4ksYMhnOROl9mRwyGLcLQ2ezQ/4\n8nZkjjFkz+iqm1TlSMiPohNKZwDmL5PQd1CfELEz+E5qoqQXemrarjRbK2vi\nR25/98/BXGpO4Sv96Si4oUOf0TQzMBVckyZ6ELS5tyfay6qyOx44av+epYRQ\ntPX7ZFDFXNnmjfeKVWxzcpGcN5QugoWMpzKCY+p8eLUbAWD7bbtNNkTvu5U3\nNuaE8dsRoqJkp1SP3iSOCJHw83Z+kRrNTT0QqccmiYAZmCEzkejc5Fmh/y9J\nLBSJX4tNxHXKu8053swkA1/8YWbqdP5RduO/E7RZaFFtMdTS9uYR1p1mGPA7\nHWAzkR+2mf7b/Db+Uw4MSJh3LeAIrzWpIYSCvKsLGQpHkcRObC4rrT7ps74v\n6Gjy1xsISVtiDJqd23rmYrRtghSQrizriH9PBE7mIy4rRwHZwhJiclrnINbA\nsj9hED1H5GCfs6du7JI44A22H3p+egEG0bWJ1a5sRdkKySjzgciurSaJ6swU\nKFRr\r\n=GY8h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsCOO0b7VJGRW6U5tLcewtHF1sLexbclGiZxmObkVLNAiBgDXaUC50zn27vUClWZKRRpWyAHTVo3wBzYTxwE3XzDQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4-rc.5_1631093611283_0.5504747056760588"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4-rc.8":{"name":"ipfs-http-client","version":"52.0.4-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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 ts -p check && aegir lint","coverage":"npx nyc -r html npm run test:node -- --bail","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2-rc.8+3a8f1fb7","ipfs-core-utils":"^0.10.4-rc.8+3a8f1fb7","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3a8f1fb75cd49c882d013ebc1ff600a9815f997c","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.4-rc.8","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-vlq4/KOG0Ao5m2APfZDWa+19ebivv/GOiG2c3bAQML+i7oSCriwsZR9XJedtSLq4ZHE1xxFyWCRSujBH7IiOOA==","shasum":"cdb9e832ccb3b49cc9eeda50c3230b3d59913735","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4-rc.8.tgz","fileCount":445,"unpackedSize":457472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQKZGCRA9TVsSAnZWagAACFcP/37S9eCFO1l+py/QDMMB\nBZ7VfgOvgtPCL4tqcry0vqbBo6L2muAVitTCGaoBOMV4cJuM4XF8t9KRBC14\n1KSfU66eOCtwpNgBTri+07uT6zsFrJCEClt/jiF8IHvXEB0hu7MlHqjGAQDe\n0XLTJoWkRHD73neLOzVRwksseUfmpI9B54Kiyd8tm1c7iPhEZvA0eZ1deeh+\nn2efPZfEmndWbt7tuqbfT5BKTl1UvGoudDw/oY7yHi8q9r9vnaPuUidOb7GX\nCi3Hx9pNvN97nJAeufOJLMQy1iOAft8WNG/CHWQNHmbECaIEVooI+zgYKqN/\nlJDp9AqTW8eIyY9v2tjDr+ss5MwZpi81K+WV6GKGjacHqksh836YYY2aTlqY\nKR73VGbBiFuHyfWTKFFTLs9T8y1T2AZg/vnmhSyAcVf0Y25laodzGZPMNJWB\n9lSR/bB7iotDFSNaL3yk+xEbM6jiHQofqfJwq6YqV1oR+K0u/vSwj7PPONUH\nkDMewwrq02QkJCOOnRl5hkE7OepwRoEmS4aRMTk2/YG/PEuwv+KoSV1ffSxw\nhMhZ2F7F1ITt9GnknFx3vQ0nushi/WsWJlwhDCBXwevsrTIy0Zlct1CD0POc\nBqGFVBOFhv5HUw6RjesSii4wsOi3INK6v2beCst4cULVljMrk9+TCD3mYgvh\nk3N2\r\n=TOgH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/v5wa5p+nDTPZzGxyQvShdX1y+PrgNZl0n80SiWrWLwIgVS/Uov1WA1nap4vdqtzQUv7RQCGVcTasIjsuu4H6xhM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4-rc.8_1631626822278_0.68276548749357"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4-rc.11":{"name":"ipfs-http-client","version":"52.0.4-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2-rc.11+d4b4fd24","ipfs-core-utils":"^0.10.4-rc.11+d4b4fd24","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"d4b4fd24ccb37ba7bf7d587308929bc4843398ba","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.4-rc.11","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-9JXga6QKS1fUVftuTczYMsqUImHon5hJjHE45rQjpy+Tg5K9N16T357VVofapMjQvLZpt2Oy9D2y0c+TW4e0JQ==","shasum":"23f606c2117f2330aea13c170521e9e7cb67b99d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4-rc.11.tgz","fileCount":445,"unpackedSize":457238,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1Nq/54LvldTSC2UV1lHWw4NplbogPhaosvQrH3y2yVAiALlVaXRPomRawb/82d7FAEM5BTq64GWUNF9z/EvGg6sg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4-rc.11_1631883055320_0.5393479750235921"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.4":{"name":"ipfs-http-client","version":"52.0.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.2","ipfs-core-utils":"^0.10.4","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"88c9921362ea5d71f7a3af67d30765c175783b5a","_id":"ipfs-http-client@52.0.4","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-HdW0Zs5q8mUhxHIb0D1UYnbX/7r+RMeIibv8DvjSjRNAW3i+k+EsH4Jtjr+cU77dq+6GLmq1S2Zoo4wuWLWVIQ==","shasum":"33b24beb91106ad920859fd1e1d072d974da1581","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.4.tgz","fileCount":445,"unpackedSize":457193,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGOy5NblSn5eUsGxfVmBrwIM96br3Ip5ktvn9DX0r98SAiEA/yEF/92VhA9LcOoL9yq9rj0FSl+Qe2jMgfn+uZflMDA="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.4_1631885048467_0.35392725612061304"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.5-rc.0":{"name":"ipfs-http-client","version":"52.0.5-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.3-rc.0+88c99213","ipfs-core-utils":"^0.10.5-rc.0+88c99213","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"88c9921362ea5d71f7a3af67d30765c175783b5a","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.5-rc.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-ez/ShoFF4g+eDaoNlX0cJujVBgIVHUHqabXLue09FIPx+oeZqOjjeglsyuFlFRPS0v0Ua4IILLSYXgjWykvHpA==","shasum":"23d92955f9fe50d2f40baa5efa8589a20680423f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.5-rc.0.tgz","fileCount":445,"unpackedSize":457235,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDem3rpD1tKqLIsv4kn5Krua2m9LWURIqS8pocq+FxOKAIhAK20FePVuYx8j8DMyzBZ4Sqch1b5F0Cmug39sQ3zwyrc"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.5-rc.0_1631885416806_0.908114887676539"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.0":{"name":"ipfs-http-client","version":"52.0.6-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.4-rc.0+a49a89dc","ipfs-core-utils":"^0.10.6-rc.0+a49a89dc","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"a49a89dca7d9b81d390af0833bcee2133959d1de","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-yDxlrU617QJBZmi+7tdoxM4E8vTpt1aPAmnvxXIId4RpszL12oUGGAWOD7S7QQGJM0FpNZiMwK2QgrlPw9AWtQ==","shasum":"8deaede8b7616ed8381254c6766348a8c87db78b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.0.tgz","fileCount":445,"unpackedSize":457235,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFtvcSL/qWXCW1I/Y0m7t3RSgliYIuJPDyh/vw5u6WzQIgEdJivRRMWBzTyvcQTipdq/78WSVjq+V8yDFR5KWgKrY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.0_1631895935110_0.04704271652724468"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.5":{"name":"ipfs-http-client","version":"52.0.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.3","ipfs-core-utils":"^0.10.5","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b5488cb3ef5ab7ea24b8b2275ffa8cfa4b7b7ed1","_id":"ipfs-http-client@52.0.5","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-vQ2z6JdBcIJvf6N1Bh/ZdpYBa7fgl0jFV8Rn3HaADhHnIZ/dou8e6nSxHkBPpw2OUyR4ljjjsDvmy2SIIQXohA==","shasum":"df11e3ddcf21f681d5bc664154b823605d4c2800","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.5.tgz","fileCount":445,"unpackedSize":457193,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDin85quOYkm5+2VG6wtfTvAfKobr4XnaelsWYPm0eysAIgJSRgTY9HBPBDva1kdsp4lpXp44eJTLOaZEpl5DK+1pU="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.5_1631896567279_0.4432619400646838"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.1":{"name":"ipfs-http-client","version":"52.0.6-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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":{"./src/lib/multipart-request.js":"./src/lib/multipart-request.browser.js","ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","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","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","form-data":"^4.0.0","ipfs-core-types":"^0.7.4-rc.1+4126a5a3","ipfs-core-utils":"^0.10.6-rc.1+4126a5a3","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","it-to-stream":"^1.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","nanoid":"^3.1.12","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.0.3","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4126a5a38bd7b42e96171b67e9cbcbf4efb94476","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nconst { create } = require('ipfs-http-client')\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, globSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nconst { create, urlSource } = require('ipfs-http-client')\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nconst { create } = require('ipfs-http-client')\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.1","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-bVsSEpJbxLKti6YxpYNo63cVj1Azsi0Uhq+fkJaECh6iNeedfVC7n8m57FLe1UkfVOmjnuoCUfG9pl1GEdS5Aw==","shasum":"5024bbeb719b21653c836b2eea4bace52160d33d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.1.tgz","fileCount":445,"unpackedSize":457203,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSPrEtFl/jodwFPkX5WLg6udxrpbpYyfXY5AmEQi+LPAIhAOQcR+cqIuPYkbX6ip16uqHTsF3kW7JkafGSqJ1pSqyr"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.1_1632240649847_0.6871473852440424"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.12":{"name":"ipfs-http-client","version":"52.0.6-rc.12","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.12+98e3c7213","ipfs-core-utils":"^0.10.6-rc.12+98e3c7213","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"98e3c72136abd56bb6e3a8ee1421f7dcc8c8533c","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.12","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-lF4ts+ceQyHzWgoE8cYIaCAihtrHpHiSZN6nbN68C1gj6AjRMhYv/+iT26Ps12L2hvyxu/OY0ipFxpJ07xi+dQ==","shasum":"7afdf1857e709c25ed337ed99fb2e0d2627dfcc3","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.12.tgz","fileCount":621,"unpackedSize":585089,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoR1bAgTQm9LtFRyLlAEaLvnPPg8JgpQe8BoWv7PeWJAIgISbFHlIf2cTsYmPdz/JzS9t9RIEeeU4TKmkpv1mhz6E="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.12_1632377788964_0.911349618925108"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.13":{"name":"ipfs-http-client","version":"52.0.6-rc.13","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.13+1d568430","ipfs-core-utils":"^0.10.6-rc.13+1d568430","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1d568430137af97b76555b015a18718c83f417f8","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.13","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-hv9XODstawOZuHwp7jiqUmzJ73w9LW0FiY+aox2NnqSrGhRIw7iSST0VImnbQHyzLCsxpz7jwG4dTeyjlYdI5g==","shasum":"70c39b6d9d07d24caa85bd6ae068aa1532f182c4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.13.tgz","fileCount":605,"unpackedSize":576964,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCg5u60HSFELmLFQgfDlycN+NXyD6Eg8wP9nm4ppXchzgIhAMwRb5wHFt8k7z9tiMUeiwkD3Ok/7xYISwaWfGMkI5ez"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.13_1632378395179_0.3783996829414136"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.14":{"name":"ipfs-http-client","version":"52.0.6-rc.14","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.14+498d9b0f","ipfs-core-utils":"^0.10.6-rc.14+498d9b0f","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"498d9b0f3c5325af2d2f93ce1538c65f7c1eb2dd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.14","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-NK3sI5lVRTfcBAlI5IaDAojyFXYPPlJknG0Z9Zg6/Xx9FmT32UEMDfM/DcrFWaR7YRkO3yj0CHFO5cVYUm3hMA==","shasum":"c895a6fadd98661bd36ba7a796fe736df0bce33b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.14.tgz","fileCount":605,"unpackedSize":576964,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCBZXvoFlKuhINPFW87GUAy37TsKCZFQ3YqVLjsL8NbwIhAMwAAqZYMde0H2L6yOFQ6hkbDxRPhrWUrka4kgG1X4K+"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.14_1632394075107_0.2912906390485013"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.15":{"name":"ipfs-http-client","version":"52.0.6-rc.15","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.15+5de1b13b","ipfs-core-utils":"^0.10.6-rc.15+5de1b13b","ipfs-utils":"^8.1.4","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5de1b13bb685405ae081a824dd76e34228724451","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, [options])`](#globsourcepath-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `options`: Optional options\n- `options.recursive`: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.\n- `options.ignore`: To exclude file globs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(globSource('./docs', { recursive: true }))\nconsole.log(file)\n\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.15","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-N/Q2hSskkagPqTfttx+HOKhqPBTt6YsxE8w3ev87XC3maXASfOrQOJV//KiD8hxHZMKB5atpg5KZIOlmYc3vqw==","shasum":"07e215ac33f349dc647c3227188dd6599e8dd22c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.15.tgz","fileCount":605,"unpackedSize":576964,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxUlvm2PMyXRcfbiILUAsA3BIIFmRGEqZmOd3dVzSaAAiEAofULvX+PH9/n4loVv8EeP4xzoxVsoB9GtOSMzygIrTM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.15_1632401811836_0.8873333559332846"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.16":{"name":"ipfs-http-client","version":"52.0.6-rc.16","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.16+be4a5428","ipfs-core-utils":"^0.10.6-rc.16+be4a5428","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"be4a5428ebc4b05a2edd9a91bf9df6416c1a8c2b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.16","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-H516GIQ+s0ml5FWv2ekilj9FVnJQZlHBXZ2QEIY8UsArKwZeOr2TTtpZpyZg1W671fr/LIg4uhEoCrhYf70uEw==","shasum":"1a9a206a45fa2e247f4484fc343bb9b5bc67923c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.16.tgz","fileCount":605,"unpackedSize":551540,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFAdXQGdG0us0wT6NqTjvKtCdp2H3xpTVKL/4umAMB1QIhAIYQJRyGlGT303Jaaz7W5KxYeYOf4NR5tnAwL/ACqmBx"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.16_1632421994165_0.7087276681025154"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.17":{"name":"ipfs-http-client","version":"52.0.6-rc.17","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.17+b0f367d6","ipfs-core-utils":"^0.10.6-rc.17+b0f367d6","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b0f367d666aceb4ea8bdd532a9d8c3501f8cc78d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.17","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-VYmEtAkgqRwxa7dwo83KVX2dWX56JggwxBsirDdMDOI2srlGHaxvcGF3lZy9DrUurgaXkEc164ntXJiPd8vY2w==","shasum":"2be371e81ecb92e60de9bc36257bd6b13c9dcf37","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.17.tgz","fileCount":605,"unpackedSize":551613,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4QNcZ83LV5/2aQGTMqfY8kxfoZYFE0gvsNmlQm3LlUAIgTamE7NGyoR2VOKBMlrMmgvct2kpABykbUVcPcQvHgEM="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.17_1632482446599_0.2906299605221174"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"52.0.6-rc.18":{"name":"ipfs-http-client","version":"52.0.6-rc.18","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.7.4-rc.18+938a7d72","ipfs-core-utils":"^0.10.6-rc.18+938a7d72","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"938a7d72896bf5e5afb2ce6d472aec4fa4929a3d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@52.0.6-rc.18","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-7XCjXjpjbwSRijOjBMd48zSuZlOMmVRzLaBesqizwPtzKz5t6YLuXqwVmdnDeEMM83Sz7HfuHBvzpvJhCXDRCg==","shasum":"88540143ec4bde2e40e6417cce750cc1b26ef1ba","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-52.0.6-rc.18.tgz","fileCount":605,"unpackedSize":551613,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAhA2L1bh0EtYRpeKucxoQf8eQeVucufyD4gogAV5F/QIhAKTe8ptJ1mSBDUvhnj5by46rUYYHFHWQLza6zFLtir5G"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_52.0.6-rc.18_1632487535344_0.13348062800824634"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.0":{"name":"ipfs-http-client","version":"53.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.0","ipfs-core-utils":"^0.11.0","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"cbd3e948deb5a6489cd69d1705a0261860c2ea22","_id":"ipfs-http-client@53.0.0","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-h8NJYTyd+RrrBtYO1+e/+U1YMivbclGdUno4lEE56REqjYDYrw3mDp8hc+cdd4ZDFbcj/EMoiehnTTBLOMKQtQ==","shasum":"4964beabce9b37556716eb0a4da2438249ff6d9b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.0.tgz","fileCount":609,"unpackedSize":552008,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIMuhcjFarHjC0KZe2UOH4SF1mbfttjKYs7VOWr4XODQIhANlBsbAgKDhfTLOjjrYS84Ib42S15qlIgWGXWp5CD76J"}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.0_1632487770095_0.8058895122362288"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.1-rc.0":{"name":"ipfs-http-client","version":"53.0.1-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.1-rc.0+cbd3e948","ipfs-core-utils":"^0.11.1-rc.0+cbd3e948","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"cbd3e948deb5a6489cd69d1705a0261860c2ea22","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.1-rc.0","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-LWMf7bKjlSjZShohRAhubZwgFMLuYN7+aJnU0N7duCvMlryNWZSf/bYpNw4pz4IbY6p1INRMpfcCXKuiqvS5bw==","shasum":"4d969fac04e363122e180dc7d81030bda967ebbb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.1-rc.0.tgz","fileCount":605,"unpackedSize":551610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxnIxLiJoC+NyqrKNHkoDDZf86dqZqlKUQFMtnRdViHQIhAKDV6UU/0PmAmxrZVqwKIyPMnjhSWwt6AxzT5+XaNtXK"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.1-rc.0_1632488018821_0.9196935496288583"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.1-rc.1":{"name":"ipfs-http-client","version":"53.0.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.1-rc.1+a0e36f40","ipfs-core-utils":"^0.11.1-rc.1+a0e36f40","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"a0e36f408135c963d4fe3a66ccbe94e60ae5d8c7","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.1-rc.1","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-HKKRWTljVSHSt4NFIWYkoL6RAqr4DuA80b5FpSSBKkf3iSdG2Bfy/eHBeNH3n5TGA328u/pps+lGqg4a7WZY/Q==","shasum":"2c291a521cb82225ee602d44fe8f66874a57a570","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.1-rc.1.tgz","fileCount":605,"unpackedSize":551610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0OlcZU2YSF4z862d7HX/qnJkYUuv8fukSbLdA0+o4uAIgPAqyw0t9ZklfgJ0QW0srmDXi4ZJdvT7b5lU9UPNzbCs="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.1-rc.1_1632590774269_0.6288652940355794"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.1-rc.2":{"name":"ipfs-http-client","version":"53.0.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.1-rc.2+78060914","ipfs-core-utils":"^0.11.1-rc.2+78060914","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"78060914410f54f443aad4c5c0de39f899ec6f40","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.1-rc.2","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-cFZufHjlDIISuWGbcHqBaSTkRTnZ64nnTeFkXwxzVnB0fY3svupTlY35UvugJqbujsGuGplLqC4utbl1F5E0JA==","shasum":"1a618bbf9128654c2dde2c74fbb1727d4c2692fa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.1-rc.2.tgz","fileCount":605,"unpackedSize":551610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPBYJmGKk3q+zByWZ1yD7/ostOWXFDTMBzLRkd2dBBzQIhAMubN8iEis1VlbgocWq69Q1hUcJ3i67TsimlzsAPPDh7"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.1-rc.2_1632593470735_0.9187407599382142"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.1-rc.3":{"name":"ipfs-http-client","version":"53.0.1-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.1-rc.3+7cb98616","ipfs-core-utils":"^0.11.1-rc.3+7cb98616","ipfs-utils":"^9.0.1","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.0","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"7cb986167d2e51ab0ce94104bac92ec63c0a7cff","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.1-rc.3","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-QILouJo4IZan+XQQPksMnk9U7I6BSfszpCamLu4wbYIOmixx/uy92UhnS1L7jsmEbzdFA9Hy230fl0sKy7lEfA==","shasum":"919fe8399324409d0e112025d9cf9d3c7aff03eb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.1-rc.3.tgz","fileCount":605,"unpackedSize":551610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMvedr4VgsyEYRIdJZ0+C2Z2Q9N7eL3+oY7aPZ9Sf9fAIgWqzCbYxsTCeIL8//cNxubWryRCEm+T1dEHNKfiaDIzY="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.1-rc.3_1632760649838_0.30021068452214594"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.1-rc.5":{"name":"ipfs-http-client","version":"53.0.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.1-rc.5+4dd8acf4","ipfs-core-utils":"^0.11.1-rc.5+4dd8acf4","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4dd8acf4d7df0ece0afa764d44dbdfbf788807e2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.1-rc.5","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-pvIZYIL8kKHSxOarOxlSbokv3xkldDc3oiRvTyt888oEHEE9jzHmy4PHiGiG4ZGO6A4L5NO2LVeBz080Gsbf+g==","shasum":"f88699f5bca5edaedcbd9c27dd0a545432c457ed","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.1-rc.5.tgz","fileCount":605,"unpackedSize":551610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKhZvsM9IKG+hnkCGxu2IzgGwiUZFMClGYeOqfrh+HuAiAmmK7b93yiT0YLskY708eP6+RXbcOO51CfZXbeR2PKRQ=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.1-rc.5_1632830415752_0.49041465281991625"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.1":{"name":"ipfs-http-client","version":"53.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.1","ipfs-core-utils":"^0.11.1","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5ddd0c555cc6577ee15667f4ef4e7f3a3b17d04c","_id":"ipfs-http-client@53.0.1","_nodeVersion":"16.8.0","_npmVersion":"lerna/4.0.0/node@v16.8.0+x64 (darwin)","dist":{"integrity":"sha512-0hmm5esSxoArEtVE9jeLwLw3pJm6rJA1kWKW+3Nqs2O8TQVSot8u1nzopF/yJ2IJGd5PHJc2JxqtEdVzV+p7nQ==","shasum":"1ae5afce607c87cec285429c7de665e341a3ec7d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.1.tgz","fileCount":621,"unpackedSize":559705,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQNgDDSmGUPI3a5Fic2gmGC60z7nLBrUl8HMn1UiVamAiArOehwtBVE6BL+cryedtq5SrJGyuGkgI4yUESXwhaC/w=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.1_1632830596662_0.9919485920495361"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.0":{"name":"ipfs-http-client","version":"53.0.2-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.0+5ddd0c55","ipfs-core-utils":"^0.11.2-rc.0+5ddd0c55","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5ddd0c555cc6577ee15667f4ef4e7f3a3b17d04c","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.0","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-2oqYNb6Y/GzpLaGZ0dyLmp6OjemqK1dtGp9gUZAT+t2ugJUcN1rq6bP0pVdOMNt2M68ZZ/hkOzQsJCE21bVopQ==","shasum":"8864d9b47a3f4177731975bcae8bb6f980253477","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.0.tgz","fileCount":605,"unpackedSize":551610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo/UxIV0i5wKNZepJOoonTu0O6/GHSQboyZs+VRpgswwIgMYbQyOuFkL1E/NPJWQsbjAclCW1DR9Cnfl0EwRMvGPI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.0_1632830862048_0.07526367762151298"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.1":{"name":"ipfs-http-client","version":"53.0.2-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.1+3ce2f769","ipfs-core-utils":"^0.11.2-rc.1+3ce2f769","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"3ce2f7693b59ad4176e245c4c7e75a91dd1bf94f","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.1","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-a+9AG0FSWIdci16A5QEY5vXidUPVzlpNJ6IjTnuLCyFp+nDAyy5OMxSgVeUD3vvQGv4d1CGLUj0I40geFKSHjA==","shasum":"d53c65a138c0c9e3fabca0a327ba816dba50fe35","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.1.tgz","fileCount":605,"unpackedSize":554207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/b2oin9vvHDWl3647dlyta+wE9n0yhFgP1jK2snV+NAiB6JSZD5u9W81zBMNxtB5BLCFIQXImYctp7TXB+r0wfVA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.1_1633016933638_0.0810502866120062"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.2":{"name":"ipfs-http-client","version":"53.0.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.2+b09a18cd","ipfs-core-utils":"^0.11.2-rc.2+b09a18cd","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b09a18cd98883662353d116a8ff25a3ddaa48fc2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.2","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-ZLuNW2YvECxWAxTScq+J6jJy06cLx2F8NkEXABmV3so5hZ+fAz3Q2famf6HY19Wo7jVJ0hpl25xd6QABAYveWA==","shasum":"7bd83998e8e3d7396a343cc1e6c1eff7e2daf502","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.2.tgz","fileCount":605,"unpackedSize":554207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqJCHvAa0y9ys0Tb3yZvqjbZ6U9WVaevgLA3fu+0F+sgIga/U399PdTtw1PvikFXLd8Ztoy97PEFor+U4DJl6V6eU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.2_1633023553333_0.958582134020372"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.3":{"name":"ipfs-http-client","version":"53.0.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.3+bb0dd96b","ipfs-core-utils":"^0.11.2-rc.3+bb0dd96b","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"bb0dd96be3e570f5a43a4f31f43d1c97e8322605","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.3","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-mxm3AerdmckYpCeSYxfFdxDfZuN80QWmKSmgdbqIvjRCliMRb+qsOTldtmQaJON6cqvNaKF0Yv3Z2wG+u86qvg==","shasum":"5c221c87b94e5c689578f53066adeaccf54044d8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.3.tgz","fileCount":605,"unpackedSize":554207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAn94e2aH5tOV0dnd/Gtuym37NZ/JQqwFawU0X1+hl6BAiBGQzqCdP+2b+L9pwFYwSqXfjEXSVsA3FrarWHK3EBVug=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.3_1633179495933_0.2902277872751411"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.4":{"name":"ipfs-http-client","version":"53.0.2-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.4+09c7bf7b","ipfs-core-utils":"^0.11.2-rc.4+09c7bf7b","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"09c7bf7b63620f84d50c8a3983a5d4c28410cd82","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.4","_nodeVersion":"16.10.0","_npmVersion":"lerna/4.0.0/node@v16.10.0+x64 (linux)","dist":{"integrity":"sha512-7pmnKqwTTVpTIHOYUQwKVTNYaP+WEI6F8szr+fpAbBQLzMjSNaZFtNHGbcycgH65dywGXydTJ8+0vX49xLaZwA==","shasum":"c1533569db4f1d49f92334383e54a98c2a680ba8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.4.tgz","fileCount":605,"unpackedSize":554207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaf6vXjmOpMveImXtZqdRelm4QuPQEJPFyzVRD/KIjKQIgLIEMhe9nL0MAzsKeYDqnWlxihLZvGSDFJ8RGLN5y8lk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.4_1633703582988_0.7408881106654921"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.5":{"name":"ipfs-http-client","version":"53.0.2-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.5+15184bf1","ipfs-core-utils":"^0.11.2-rc.5+15184bf1","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"15184bf1838956a44c079660a4d82c24166407db","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.5","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-cVq9I0kYkSvCK9AQ+KehqOdyr6UDckdN17elWT2bAhJuANMgq8tzyjjZ2vlGahYPSVlOVLuvtCAIJ/G1MVmUlg==","shasum":"39143c9bc39d6cf3aaa8cf7787783ca59164da23","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.5.tgz","fileCount":605,"unpackedSize":554221,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhiXfNrZrKBcE3QlJEqMJWVtmhpIvWITaLD9Dr1w+9dAIhAPv6op67nCV5DsrFN2QfpmxMoUNtRoiRtn3AOyipea3+"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.5_1636010779570_0.3293176615858726"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"53.0.2-rc.6":{"name":"ipfs-http-client","version":"53.0.2-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2-rc.6+8a3ed195","ipfs-core-utils":"^0.11.2-rc.6+8a3ed195","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"8a3ed19575beaafe5dfd3bce310a548950c148d0","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@53.0.2-rc.6","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-+hlvzlCbRsdfT0jzA+s+zgtYXtg+lh4JZh7GB7wYBrVSrbcn3rBRQXk1BqJO107tskylz9egCJlaeSpM0HqM6A==","shasum":"85cf79501d33522bfb18d6858b32239a320e435c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-53.0.2-rc.6.tgz","fileCount":605,"unpackedSize":554221,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgEl3tQe6Vgvpu3pg7xQa2Aq91tpKqzzBU5jwTzYwbHAiBpFTwjN5DKBoZk9GuMbWXssB3p3+0+Z8yB5SQ6UVu7Nw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_53.0.2-rc.6_1636716674632_0.7098688788045864"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.0":{"name":"ipfs-http-client","version":"54.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.2","ipfs-core-utils":"^0.12.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"568aeadd8f308cc230de06a956c1a9e6102094b6","_id":"ipfs-http-client@54.0.0","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"integrity":"sha512-BS6gNsm1uCVU8DiJ01UE1jM6xpJaowbCSlpFHms7rwaIXNVt3bTwoBRXYAfmLI7GffU403yAOEilwV6SWccuBA==","shasum":"f68267b61f64a3800561229ffb9b16a4ea67dd84","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.0.tgz","fileCount":621,"unpackedSize":562423,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEuDkR/U2mu1xAjTiNk/WoS3959QbSawBkLyC7JeTlzAiBpmQe4nlJMbbI8C9pHsV730wVAmxizLKj4iE+p7v1zRg=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.0_1636718076507_0.39007150980826255"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.1-rc.0":{"name":"ipfs-http-client","version":"54.0.1-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.3-rc.0+568aeadd","ipfs-core-utils":"^0.12.1-rc.0+568aeadd","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"568aeadd8f308cc230de06a956c1a9e6102094b6","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.1-rc.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-gvzZNaROnFKdQvPOkuZbLb7uMmilmcftjMLp3QGteki3L5NAa8UtcC2PnDZaDBQEMojEsHHYVsh88nqOzcHbqQ==","shasum":"dce9de7b0788efbe3337a516e0814ac6b36db02f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.1-rc.0.tgz","fileCount":605,"unpackedSize":554221,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBlEjIclrVADGe5BXfJ8sOLHR/Po2crJvEzY72J+VSSXAiEA9JAuCZaFqqQY5bnUczgPZHfiYHztLnVQ4p9MrFI6xcI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.1-rc.0_1636718169111_0.19045588966287808"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.1-rc.1":{"name":"ipfs-http-client","version":"54.0.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.3-rc.1+f419553b","ipfs-core-utils":"^0.12.1-rc.1+f419553b","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"f419553b9dccc0a1172f399c41b766a754a3ac56","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.1-rc.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-WQLUS24Q8YWfWwCUYiU5xdOimnCSRsXbYq/pHwCqiEYPy3ex/OoIFLNJTzvBpHnmfjkkZjfnlHmbMnQpBEP8aw==","shasum":"2d98f1d4371f01becf1b41676cf5286e0356083f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.1-rc.1.tgz","fileCount":605,"unpackedSize":554221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl8XWCRA9TVsSAnZWagAAGFMP/3YzMUnmS+88VDoEc8Ed\nB/4CrVk91pSkOv5EFT+docNka3VZ26Ixgq6XgKEVQkfGys4C3BfQ5ujlUXqw\n9YEW83z0NRR4IAWYgeGWaBhrMP7l3Krt6nRUGIlQm3R6Lcqph/fGzCku06Q7\nBJZQhY3myFGvwA0VmocX4r+MjASCChRZsQ2ROF3/RlAQrHsbNmKz0a/cMb4D\nrKstd5PYj94g6TpyYp7JPbkPyAiGg5R9qqWyRcWgwMMctQHaQ2iG3w5I5L2P\n97Gx2f1JmKyjT/DqkVIpJLgbT3Dj/Iop54TPPzi9QWJDeTCjijnlbP0wYAVW\nb1G/77uaXqi8AvkHf/+BNd9E0PvjLS2crrvB/UftMFPy70a6oI7bjCdtwc3Q\nkX+fozg6YYY1NiD8MBfxypb5l0ZcKUGpVhUDHFVnPJ/ZjjKfOY9KdDdxxvTv\neW4S/um1bELfaEaaXAchZ+OGW/BNUDlqrxSxoG9Bf+Jp+Fj0PHA8gVl04WTs\n8lMNGFNSScZKm0W1h+4j+YAGQMYxmcW014O3vR5sfX2PSaGM6LRZSeb+F6O+\n1QkqK+6PefwdUxXzwdAqUf7OJ+Dr4x3sAI+4hKg6BY9VaXL3+aNy4eHpD4/m\n2EWAa/kDZDuyqKYdaWM0aas08jnBMKGXNU1Fl55KfpgN+t7EmBq5yreUj1f2\nejGo\r\n=tmv/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0zaI/ukeR4lXVWHGa8N6fAsUbubqfMl2uMr7rSK1d1AiEAtIvuZg8ypK4qIDj3DLkJutecRK57MYrt3jlp1IynsyA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.1-rc.1_1637336534212_0.4169269366555992"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.1":{"name":"ipfs-http-client","version":"54.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.3","ipfs-core-utils":"^0.12.1","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fdc148b5c08c0be49eef77a18259d5baa895e3f9","_id":"ipfs-http-client@54.0.1","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"integrity":"sha512-JR7KYLEzZgkpiPTQLVX1UJQ8JHGOQRgdS8zY4I8V7LBcLyJxVTsXKqcusasPw23BGeVVqB1gdf1sNTgs4fn5NA==","shasum":"b7fa57ac98ba1f75835924c9fdca8c986a279535","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.1.tgz","fileCount":621,"unpackedSize":562423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl8bMCRA9TVsSAnZWagAAQfEP/iMpEm2bfXxKicouFGIb\n27p416SrFDFgxnq1RojOZWTNZR9d81XGXZBFuooQoUjNzQdyfvtHUjuS1Qx3\niMQ7tr2sGWsHzS19Xm/xWuW7Jvzntrs22QSsWspmZ0FavbhzBw20fBdNmTnB\nEyqW64wPCUNhoGMcRUMJyxcANUnZ/u7yCs6eTfV7AV3ygN9Iw92SfZXfzmZL\nw0H1V9xpq14F47ZXF+fBb3f8V35GnlJD2+1Yn0fj2pAweH9lijn219Pwt7/W\ndrWpKWslEaImTPGWrKf7f6EBtfkzD/4/iEfHWAH6je45VEdwBvfupyYIbbff\nAhmf1FuPlacBgHXD4ufLiKwu9jlfR4o/4MAbAH1A0dOXYfaqxxMRtilqO+/9\nEi4/4NCbUBlMkiMqEqWtzQJsEg2ZAuWpcaWDZZdzoQ4LiQ/FzS+foxv9YBTA\nJXRT54ttCb/nSmwXlfi7js0okl3r7MI77r+j6ZU624GwCIDedH72o3/EiTcM\nRMfaJMLJQJpNn5SHoyKLvsTH3cwW3Km6SdmheGEFwikZ3NvNAEmaRZyZ3jA9\nfB+4ksKW126DYPS+Qg00rtB2cMMiForwaOgWv68hpcR4d+5LHdgOpu6zn6q9\nwhtNAXGGm/eHkxGnaDLtwEWsQ5XaMa21VvhVaKOo3yq9xlVIkV8A6VsTJWSs\nmmTC\r\n=DKGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZGREaLRsLdSqsgnR2NY1SR57TtGYXUqYVzb6rktbXZAiEA8xboTRdyciF6jMNLHxxYExbtIAXQHcJOFYwFF52i4xs="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.1_1637336780511_0.625883949769761"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.2-rc.0":{"name":"ipfs-http-client","version":"54.0.2-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.4-rc.0+fdc148b5","ipfs-core-utils":"^0.12.2-rc.0+fdc148b5","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"fdc148b5c08c0be49eef77a18259d5baa895e3f9","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.2-rc.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-0PUTt+n2UCsiy3JhgsMUd1YzgEFzxlFWNlgo/LAeCzu95/6KXVQYgaIo+RVshieXH8XYYEZQP4Iaaxcj4xUWQg==","shasum":"1e4eacca597de36fca1a86e52fc2fcd3b553311c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.2-rc.0.tgz","fileCount":605,"unpackedSize":554221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl8dUCRA9TVsSAnZWagAAmjgQAKBt/nmoXggUemYHG106\n6GiW7hd1BiGW8+lKXAmaGiWXx+CVz8WAe1HmZGn8COkjSRx9inzncf8713xT\nGeWX/dXoeZ3spPvHXff77zVVyN5tUc1cXDkHMbCeuBkNgYCWjFak2uymM3Eh\n1/er3wlJNNwPWz2LatEVUQ0KDF1W4Fhbcafpeykn0Mp+ROMpX+62viYWPm8J\nI6y3/nIZuY/YU/oROlkvnHNog/hEMr6mIXYuKsaAWgmRBYwpUc+8elNDkWCx\n25GjEeEv26iCPNGOxDvCC8gliYaJtNgTOyvw0oteUq3tyuC0SZy/cYsO/nsF\nY2CkmUIMYMaxYvLjdwYbQ6oUZmt4VkFUOn9PrnkR5doFW+iKQC5kXVAgv+A7\nYEsrz+4sMhUd/uxqY65PgxZu+q5LZFH1kqysRUtpuftEhgPZ1OU9SgOmyBu9\nwS8qACf3t5cyD/zF/Z5tHouOg55/yYxFXtEhADfFKlCfrkbMXj38zfQnLh1+\nNQm6jolmiOHljlI1lIytc82SltZ3B+ZbfJmoO+7GyAzE0u0fKSssUVHbEutD\nywwnE1XFt72mOOidfI+wIG+Ck/PcIiVkmZn4E0o3S/DMBzAlpRpe2QR7Y/he\nhey9QcMitNtp2ZM+w9E61deR9hzFIfxQUQk0CSD8+i7gyse4zhsgEiNQqTAb\nFzJ7\r\n=HlRI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXuwcSQMRwpoNtafQzydd6Abwtcv3p9w43LhvFaCEX2AiEA4MxKjuK55lKtYeLOMrTpS0F2+5P5ZdPUWdBTPVRtxzU="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.2-rc.0_1637336916618_0.08150256811077794"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.2-rc.1":{"name":"ipfs-http-client","version":"54.0.2-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.4-rc.1+041fc29d","ipfs-core-utils":"^0.12.2-rc.1+041fc29d","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"041fc29d151e8727ce9aaafd2c46a4cd34baa8ce","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.2-rc.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-jli3Hx2x32te6iR75DaS3CZoS51CJHSEiQryKVvKt/llryRU+tgDuAsPsE4xSHrw9bCq8KD0A/g5IHOK++tgrg==","shasum":"5401c1d681d0d013d764e06a2794ff1de75f4fd9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.2-rc.1.tgz","fileCount":605,"unpackedSize":554221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl92YCRA9TVsSAnZWagAAIIoP/AyNERJmXcnENRtolH0H\nRu3vt9E+/ErhWxwtpkjr1uiN4SpZSne/nSi1SIbd5ppsqMJQ3Ken1CAO/vqV\nW1QuMOwDJ29JtpG8NbWiuSoofFyTiELx0BmXDSMT2py7bbRqQ+tceZgpt7Mt\nkClptfN+4ATvGt1ZKUDjO5/z2wspRYZyB+49Zob73g5hgSCEyBM8dnht1sHC\nUoVfYWWS02S+CLao9GcBFSyuEUrMsiMPe12ljO2gNNDquXeJqT/01RxjLq9X\nNtI+7Xi18m3dr3fGAws8ngp3k5mPfTquqMAwPp4oYDK1o9UTuoejbxkFkIVT\nGH2SoBJHNWm+9DgPlkL0vVuCHIJVTFSQxNng3gz5jAcKBNsrbEaTkUk5N445\nLiJYsV+MKmpjLbnrWodk3Cn/eAv7KlzjSU5wzQW12+edz1/lNwhpGxFzSyVE\nKD1ILELRUxo5tLToIls7E5+fh2Mr31nQdIcAQUKXA07jiuOORTXO+1NHN4Dg\nn50D2y3K6TLUd7ldAxLqz3gKpW/JG+DJLAuwvJf9hbcm/9Pm6TdqLgi1uLjg\nLko9WzplAF6I8igH6sXF6U/Z4AnFPKMsJNrY93f6AMQVZVvG4Elq1zK5xWY7\nT/W2A5hTl7+eXXPObSnN3gqff8+t939cJ6ooavKREe1ivK1NIQFz9hVObeJC\nySyh\r\n=cdsW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuofG7/NSElebVuAA+bjZbzOYwYtxsyrrmRFmuZL9smgIgHRFFGnGko9XWjyO7MqojJ/YlgXmkHAIWRWirGuao9oE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.2-rc.1_1637342616696_0.276972607388682"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.2-rc.2":{"name":"ipfs-http-client","version":"54.0.2-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.4-rc.2+70c67e27","ipfs-core-utils":"^0.12.2-rc.2+70c67e27","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.1","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^35.1.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"70c67e27d0b82c7650a2a0d7a646afdcd24e73c2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.2-rc.2","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-WgqnIhC7fyEsNcH6Er6DlqSt3bUHWiE+i/bPhPfcYLO6MbBNjPQ6evuxYcbo8v8xMLYs//Ph/nwGO1/yXivE1w==","shasum":"74e847181d9971e279db1b20d986b69a67b7cf51","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.2-rc.2.tgz","fileCount":605,"unpackedSize":554221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm8KXCRA9TVsSAnZWagAAcC0QAIroRojCRc5RM+xlP0Y7\n3vqFb7BTUi8SYUs3Wf8om2wc8CwFl/k0s8nxrQ/urDITsWgbx9ozHvHNy0wZ\nYFS+Qi9D2vgdFtd/U9QwNziSumPwqcPQDE1VFDzJjqEc2z4MjdpBg9A4KYlm\nF3civRoQQuiMlyCxy7yhhbgpbgQkqlss5QSq0iKfXYaj2qpr5bwyeboUc5Z8\n5l9oPKK8tXUASWz4n/Q5kDkaXMfCiwdO+G+aS0P5AyCD9uio14qvxG0weVPw\nYc5Q/Hb3DBUZDq4JZobau2+MlFcMlSoZWyUcoTKQM8p6qego2lRAuhK3nZux\nmIcF1/unCLST+2aGjNSFlLTcqvGRCxV5YX0waE3JuohCgHbrOadLIGgh/13W\nVh6/FZ/R67Gky4IpOt/RHMAOd19V/MlrXN5cpj+XEe8czGO4H0cPpiJiOYT3\nYU/Be1NQ41sZw5/My1pDLhNaF28BsqOEEblHDb/xe4Xj0ECwBSLh9hChnQ52\nyfW3kBWpeVWvU2tYdFG9zJhjV2B4YSof+DP55Q2QqlFyZbbl5wAhGXU30Hqg\nWqIPSPEjSGcr7HGaTROdrntlMnm72tS/PGBZ11z4RhBxdsHIiPu+5n+zIye2\nGUpj+BOjxdki5Izqcp5In6hMNAs3BWEVF1uAiJmoaKbiNGIssrcytNTbyVhB\neBa0\r\n=1cWI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRU+NbdyGdhu7gQQAUbZi+b6eq3KADIU5VZ/FwhG5SHwIhAIsWpLq2g/NFwDyJGATsXKR2dBUW5g/YgFMYcFdiKWQY"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.2-rc.2_1637597846974_0.36325523632078793"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.2-rc.3":{"name":"ipfs-http-client","version":"54.0.2-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.4-rc.3+484d2559","ipfs-core-utils":"^0.12.2-rc.3+484d2559","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"484d2559cfe120f01eb9c5dc728d1f7cfbd89730","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.2-rc.3","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-SerS5+T2Irevp4w4EMIsj+0CPReymhHWqA50SeukSnoVpADOeLuUTQoEP5plE3eMN/LMAp/DtcD30ujI+P91yQ==","shasum":"837af0b208314b84a15a093612f42f74525ed0f2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.2-rc.3.tgz","fileCount":605,"unpackedSize":553182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhngd2CRA9TVsSAnZWagAAPsQQAIDlPZQzsYgHsdUnzS+M\n26ci8N3ufoupQhpMKTbVBIYhR+vN/JmonD7Ih/SJRkfsFqRwFzkzzmf9aJvX\nmeem2CPn2LjV03zbE/h8XzGfdDnwJKaFVGmLh1VSJkh8J2BQqkUpv2edkW+J\nQSN+dOcSCXwPjJK//hHZyOlgHsBRhHpz7CyPeplkzhkmiBYrbpFmf+pl+sig\ncYbEvNP+tLPkRBWhYWGVSa5mEz/gjJc1Dbr4AmIPkDoukLbeqpcwaHRyaXqa\nfhf3IrCp3ZarT9l7UTS9EbzThTxeQ7LQfD8sMcCQqmbD4SVzj6upeffRteb5\nwNFDglvN/rws6QXEDoGgyscKvx8wJyiCI6qrHOF8abgCsdaI/kM1MnQa8Vh2\neq63WKzW1Fsv/AlcyrWgGZXU86SRKX4syABrxvVlpdtNyNwcrscHh9/U5bdW\nxEK9f0LYZ+uVU1nvxbsqMX5f1LNrGCoLniQCN4SJ1/F+s9bTbhIbIZUAi3CJ\nRrKyqF6bFSl4BHK767+ac1r0ScHIfP6QiuYmB3mGd3M1SmB32i0Y/tnPT3c8\n0q9ql67Is6D3w2cVkTVbgvXbMYZFI766PfHt4dYi7LcpdGp4Ffn45TFaDUUh\nTJ9PUadTv1fexy151G/P552J4EpCc3r/ojUxNPQZGqYT4ZkAlDfgtYZzHjeC\nAAlL\r\n=jr8/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGdD+hwTAg7mEDvARVlrYSmrYcPyqSYPeZt7UEHeDlrAIgaf8LuTBEMe9OO7HclYVQ+MOns1bUvRalycg+pDcsKwk="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.2-rc.3_1637746550473_0.1276357138130817"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.2":{"name":"ipfs-http-client","version":"54.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.4","ipfs-core-utils":"^0.12.2","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6178708aedf5ea86bf537862c08db49f5b8ea20b","_id":"ipfs-http-client@54.0.2","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"integrity":"sha512-gPTD+Hy7UdiM+Ez9n+PJmSQ5m1fShhDhIkZ+lTY2L9p7KFOU643qACqUrdZZjlZIRWHg4htHSYNPnTRh2bjOjA==","shasum":"56871a7103e81a69658d796e112e917a2dbf9e48","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.2.tgz","fileCount":621,"unpackedSize":561384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnggCCRA9TVsSAnZWagAADCEP+wfDoWIIIpDPwvtX5kR1\nIfvrXdrbwC5xGRZW1WOhQ0EUh2wSuK6P14CQg6ianvtiSewdhcK6hKaPMv3d\n/BiqB4+CYJG4CUeChMLBew5pOU8QkgWcGpHzbkx10+5H461/JpAY3fB4BMPQ\nMEJ5FWOOIHYHI8IVCxxZehFv7vUox1uGM+d8rHnaZ+E50d13iIAyb2t3qsBL\nE3e5EPJMm29O3GfcHc5noUB2x6VO/Gg6Gr68M/Wde+xErhMswWFpeDB4J+Jd\nm71B+q7kc1kXl24eW4Zv3DfzKUGp6UKsmTk1XqSwgeweo04YMCFLdeUdNNih\ngJcJAl3st8RGpAj6qsB7KjPOBeu1avjy5B/2d3XbWYklfqKjafM7KHhOxksI\nkUAYeDoG1s7qm6LYmwFg0Ra0yCVRXnfneqGz8x2L9QKIUJw4itgSW5mRsga5\nmeyfabH6l1Mws/+ClY6T09M0nLkLXWNroTdXKySUaAmUbTnDgrsj1dIx0/cx\nGfbGdJPr09pocciUIcoHL4ynF/0mwcEdqt7QKfdQe37m9ENHZ04a0pg5v6oL\nxBleTRe8N/rADmQsp3M5jan7NKEg21oa8ByLCToMgriD4SPw2tYznHbJ+XhU\niQjaKV8+I8oeKfUS1jj86ZLJKp/zTGXVtVZ9zRa3T+TS4F8UP5ih8RWHDn+5\nnTym\r\n=FexG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkO99r8TgqJzxefq1A9OwjHmjI8SWZfLlyjalnktywCAiAbtVPDc05xZJECcVs0gm27B4bA2QM2eTiBPXiKADGRwQ=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.2_1637746690290_0.9531357730397143"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.0":{"name":"ipfs-http-client","version":"54.0.3-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.0+6178708a","ipfs-core-utils":"^0.12.3-rc.0+6178708a","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6178708aedf5ea86bf537862c08db49f5b8ea20b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-LG16NDm/cHyhRtCE48MK3pcorTgKhwhVCFCVgVkFjG/s4lke0UggBIZFWFDZw0QCZgOYk19VaGO4k6WVxzvhxA==","shasum":"dc95bd3821f3feb3396dc537d85508c80e948cde","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.0.tgz","fileCount":605,"unpackedSize":553182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhngheCRA9TVsSAnZWagAAarUP/3cTlLrN80NfabHZOzpR\nBpSIvfasB2LTWAuB6qdVGM4dQApaJup0ewfBP7Jvue54hjQq8bMQPIU7j6z+\nbHxKDwY/STa9hJXuGrv7C2NkhGP4OqrMMHKtpUfNx3EIafZD89wGO3T9Ls33\noU6zDaKKtob53SZ8/HHM7JUgn5zQmR8D0VmkEBLhpjPFlmRMr/J9SVFOL3at\nZfpy9jdEYgvSJ0mDpm0JRFWqUcrEx/ST7RN05vKVNiD/XAlEeqr2vpf/VU4E\nPGSkWICqDPRDKyoEQW2Bjqv+6MoF5Sa9l6Z7Rq58LtIlou5RiOyK3s26rQRL\ngGL/fQ1IvEnaLRTZfC0oOhn09jbUXJB2vjU6Yw7/MeV4zFhy9kDrs+zvL02M\nhLY9/2n2QTKPLGcTlvhqMTNUyx6VlyVXOzciGH1h67s2OHMkdvziCJds/hge\nd1cYjgwwp0gA3VskYFEMBClTq/KCxfhvUnanG//BZM8mQ/3gpsm6FCml0o4K\n6Y8VEiVz4OlgyqMS5Ab1tbUBK/xZEgwHSp2/y2jAEp7uRbEnmcyQp++9xjSZ\nayYKwVYZYurPosPfsbsaKC5Qfujmh/N3ln5vuoyhckNYpAUs17EzqxYWjSoN\nLpau/Pd6R4Nwb4BBxdxCjgpkWVQi9dF2loZ58Vl50+pSfC3z0Q2hXXxm+1Ix\n1dk9\r\n=2SC9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTKOunq4bU8TUPUFBPNaufDEUwa/30F17Su9CiuczOeAiA1RGSdzoHkyi8Vdfc1ms7tG8HaJPIVBPTa5OeAF1p0OA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.0_1637746781942_0.17265739354887732"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.1":{"name":"ipfs-http-client","version":"54.0.3-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.1+62d8ecbc","ipfs-core-utils":"^0.12.3-rc.1+62d8ecbc","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"62d8ecbc723e693a2544e69172d99c576d187c23","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-KtXO01x1TM9yNGtBvqGHRMQt9nMBtWtRJEUtBG2V/knmgLQJ8AQuF1yHq78czeBCHllKZF4iBnMySdVAgVwOZA==","shasum":"8674e8075e7288c9e8667cc8d921f64020b24e3f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.1.tgz","fileCount":609,"unpackedSize":556162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqfbTCRA9TVsSAnZWagAA9q0P+wR9PaAqxW7uxM9kYIIk\n2Y6sn+RkfSiH4mQtZqW9KvcezgGEPeO2/g8wVi3I9H5GqXsURF+/rzWNNC8n\nHl3QyhFgGosKUlr/fbDRuiftEy1KnG7jkOBVyzSSC8YWj6C2C+f1w9v/2Frj\nCgSWpopRSodry5qDTo/yPQLfT3QF9qKtEwvUrN7R077WLeLkmLLvU3/+shFJ\nLA2V7y9NNAVcTVxoDlenQ2TCkvIiHn7810ccF/ekA0QfvggXRxAiQ2HnZ0q5\nHQf+ccgUzApKB9FJeapZFyo0V1KRMjIaeqiufIOmMRH2ncQ3+xE6b1aVNELW\nwqr/bzSC37bRLtJfOhCjHjC3uWySjPiTDkH27IvKGJaTQhmq39QqQciMv4No\nP5BAB6GTiIKvwdHyunwjTyGC0H8cpsApUmZCif9bU03gtAzllaiAsLE5MkMT\n2me/I2ITfXjiA0VcN/FQTCzcdjq/ggcmPfPnU7xMtKMFwCfXhyuY+TgO1Hag\naPqAZFkogPSCsS/N0COTMxlYjf6Qz1JBFRkLjYMq0PjCgwtvcoJHEy96f87O\n9jYOiXZH29zeS60QNOkP6JdkW2Yx45cK56xMtjMhBIduAx9A3CVvR+w4v9In\n1K5MJQJ1Nqp6pE2EbEVY+FoK9RDd/m9oH5mZpqtZotQk0NeoCikhop/GwnbU\nOBCa\r\n=PTZn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/4A6fV8cqiLMUOG2CIARh4iDpE33I28B8ptKpyTNCPgIgNjBYxWFuJy16ziv3Z8RNIcLPlXPYd1YddZYiTrfWQv0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.1_1638528723073_0.2066342606384668"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.2":{"name":"ipfs-http-client","version":"54.0.3-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.2+0c269cf6","ipfs-core-utils":"^0.12.3-rc.2+0c269cf6","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.9.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0c269cf67a8f6b48809472e83c4c1cff156afe0b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.2","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-p+XEMPP/mem6u8PJSN0cMaD2hJLylMq4ZLwuAOo6BcEtmROlVOuTpSUd0vjyGdf0DweiTPuaXylTejkWTjpEpQ==","shasum":"0f23a31bab0d58c58d430f14ae1f5c43b33db407","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.2.tgz","fileCount":609,"unpackedSize":556162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqhsDCRA9TVsSAnZWagAAOwoP/Avn08cUcTHQ+seblseE\nDcBAaiv6k4s8mAI1uVMvyk3ybE7mAEh5VXDrJ8rr84KVZ4suq3rSExarz8pF\nAqrvmk8nVjuy78Vkd8DVGTdsU4OqAbM6j+B6vvZprWCo4XGaDnF13zFRPr1o\nm8Wbynrh8dqZ+bqOgkXCzi4q9ByyItNOdiL/WbDfyV6eOuGQCziQLX8Zv74j\n6GzbJZRL+ydvpvFTJqnxoT+tiQRQT6WBaQbQcYwki+iwoV6STvMsfe2V+ZdA\ni4/mp6IL3lExTOAN8Z+bd85k2Y4qsIJe57uxMVjSD0Y5MJ0Qxi1uMaIzblN4\nKZIQMHRGQOSYCZmscmQa4220U1k1VqrweX45eDuVa/v4AiPFf3kiZ6uDX9aA\nyziw75eYEjByLFZjSSatd5Dt8wa4R8nA2wmq/+3dgQlCZikQaQFE5S5OnhHh\n1llK7k4mZzGKHcO8tUbxz4xAh9K/lpjYtlSLnUXbA6bZdcxZgrnjPMsfXmYd\nu1S8Iqm/5XVDpz6SpEbHf8SxsYw2nh1cwgCONcdkfs/M0gCDYDCh4+AGZ4ws\nFdH5eOqoL9qrIOxIZs/F4ft43iKNMv7tlUcrP7BgyJOwGBjB0Ssa/Kaugr0i\no6Xa6bYTipdJZNLyFIXoWbiEor519bICmwwWtN9Xpp/gFBqyorUTZHXY/VeJ\nV0oB\r\n=ABcD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQfuYxkT5n+oHNMaVZjrGlrNX6nPks0dY5SquCD21ryAiEAnCY+EUnCgXySRFOrtHtO1Cowj74broB79eSzL5BPWj8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.2_1638537987694_0.24544058102582844"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.3":{"name":"ipfs-http-client","version":"54.0.3-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.3+38c01be0","ipfs-core-utils":"^0.12.3-rc.3+38c01be0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"38c01be03b4fd5f401cd9b698cfdb4237d835b01","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.3","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-BdJqnQO8SJ24QSxGowBMEch9jjvE9q74O7hnDrUs9zRm9K9Y7VvvpkqNWICTb026j9rF7xi9N7VfAokb+OjMyQ==","shasum":"be2e7b573b886bb3501f5134cf62688bbca93092","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.3.tgz","fileCount":609,"unpackedSize":567382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqiQvCRA9TVsSAnZWagAAVMkP+QBweGz6QgiQzxRel08Y\n5Vqw3xweJpwCGDutcjSLTbsXHpD84eyzcxRNr/TZCY4XgAL0aLiv21Nrin1f\n8Lp7HKJSNF9BBSux1apY1pczeC4QsbbPo0jdluoGNj5Pz+YsRxYFQ4nU+DMh\npwTC5o6WareFTMEPposzT+Zk2tfSaq2uf7nGOfrETAtZ8A87Ti/VxRhxCUrR\nb7QsahDFkKZoSToMpy5xHLBhlNH7gzXduoXp54D/rn5seLLZpZ1J8lGd3egU\n/c5CnMpgc4sOiDeNgKTKEUdMwE3T54w0L1xrPZRCzO00jzAGcpsm7GU10/f/\n+c5Ze0luNrmxjHNzgOJvi2XZCYEGHbkcdu8gBpDdKgc+Og4JNrKJhyCR5etV\nQumPEx9ILn716R48L4v+tTUm3iwchjOiiolmNsa5hk5e3n1YEfBhjeINo4PO\nkBy6iocc8H3i19LGbM0Pym3AxfZrSggfZO8e+Se8IoXyZxRwOngTnzcW/oso\n2WEbLj8iNd0uRZRq7jXftJEYrKv4NLDqPAUHWtbtfs2/g6L9Yhx1yRYXyo2I\nsYzSYmz7bImWFN60HObAdHqcFU8XWEr/vdtM7Zn6OZw5i4xW98R1uHJGEvwE\nu/tgnoWIL5RRZC94ee4qiLJbrPu1YeeI3PrRtMmqG8UZK92RTzHqUA6HJaHD\n6yUn\r\n=N2M6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJLuhO8wUPOalPizm0a9K1t7rhsRupfraDfmBpwnwpLgIhALpJWaE0DCLPxxB4QceDqurPXtpINYEClv5xzhbyoPo2"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.3_1638540335044_0.646551060540266"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.4":{"name":"ipfs-http-client","version":"54.0.3-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.4+9018432d","ipfs-core-utils":"^0.12.3-rc.4+9018432d","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"9018432d5dbea466b8332b0a917a166942e40d29","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.4","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-iEckZ578ujlFNohRFGe/Op+FZtZ90rP/5J7yfxtH8p7ftgBwe5Xd9w9qpDqayHgWjb9Acq+ROAi4txZoo5UWnA==","shasum":"c18325dd84bde6e8890b6c5026d4a0be57b6582d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.4.tgz","fileCount":609,"unpackedSize":567382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqjFXCRA9TVsSAnZWagAA/IkP/0/rCGYKW5vcbUeACujR\nUyQZ98VFqh2guKU1DHKga8y8MXoojcjZsPYWkYkZIFOsgnzqJMOEMmo5r3Jq\nX6w4SLbexL/o2/8Qi17JHkSxb2WxBtqGkPd33zLsUXbaEWyOdLyBVuFF5wc0\nat/mX84htkJoyKo8YSBepor76S+/drISD5sjMpoVH6s8gaK3HZa3K+YKfMWJ\nu7OnyJUWOxMItiB2iF08h6KYwpMnQwAvNv6+8jDYToIqb5kbZ+lt3TNzT03g\nT/LVjrkjsvXvFEwhgWMmJH5l1/vlzQ2FR0WosHzo3lCq0G7cqKjfM/RIQ5OZ\n33O7+DsSvgBlEEmJ2KSGp0MMEzlRM+o3dUZ3vitAn5o2ke0mqTR/+1NmJKCR\n6AZ52Tsmc9t764hqy+o49bsy0i0vd4ADepJ/mK8U3Pkm2Q+bOWxgVVmjIzjJ\n4omwkNw60kDt71Bbf8HsHdWd0CPIkWKKiK95EvU6dWmGvBsJ+6MmOfqL5fgi\nXNHyoXYKkj+CBOF7F0YzhoeP7wKmIfLL8hRTatstBbVkYjoE+F4zWg/A5ZoT\nQZ0g/oPbeCW7cXKmfh5OGx+acFEqyXo5CJvtOPlL8f4w+u3L6gzpBuw9/lEk\n2iE6OKXeQdBfsOn498O80CcpbvaUrsfjhcHX8dTF31tseTulVhkQeBPZarBI\norox\r\n=JfkY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtvkZ6C1GlYKzD3PTF567W090ow5HBa0MF76OASdU4NAiBWepvEKsZuee8pojTDNlIED0iiecIAe8aIMGg1YEaj5g=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.4_1638543702819_0.4351922642245152"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.5":{"name":"ipfs-http-client","version":"54.0.3-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.5+45ac9730","ipfs-core-utils":"^0.12.3-rc.5+45ac9730","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"45ac9730d6484e8324acfbc3579fce052b8452d7","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.5","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-wrgPxsmQpUBsZ3xi4cvJzeUNWOMJf4tM8JAS3cRFxs9EonVGOjUO1oeh3OfjKrcCBh37QC1GSHGas7EAW480sA==","shasum":"8f707184c9ac84e78c89eb20a932aceff9993960","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.5.tgz","fileCount":609,"unpackedSize":567300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhregACRA9TVsSAnZWagAAZW8QAIKQOZHdlZH7MEiwt5Tw\ns/fNzxu2RxU5w94ei17u9b8cE32Tns4T+F/BoJQKe3e6JERFGwVyFEXoH7J2\nzn56T/Wep+8ULczlJquWtzzzHJeP8ZDEYLyhIYc+Tfb6XA6t7/VSmR/wmGuG\nsu8zwS0oAehkk2HavDR0FzOURNiNLQ5H3lGRnvb7JMkIRo8blS52krdakRM3\n0IsM1LCy5nGIzshLv8W4LFFp+0tPrwLT4zNwl+89NI6LbQRUh8D1J5PCo25l\nppyliflFxFe7OHl7JFzKeQty4agvJL1sJd5cDTWPnrBP29Xkn14ZLj6kMuws\nj6o+g7ypAVWWe3nuadipoU6lckLvb67WHk4/c7yZ3j1jJnUWK77hCYQej8Mx\nTiRPgMVzw5IJ8kYK52YjqJcsJZKbD2FFPwyUEnc8s4ICIjms1N4o8TSuu2At\nhWXFjhiFtJ9wjerRiiJ7bdKU1yznk7nwWzbaTzSr3xL/RiJ3lwRxP6gFxuxY\nJgxf5KtrWEffG1FP1GSpkN/jAH1TMhUk7zXUWKKiZC3RC5pJz5fRr4oxhLBp\nl4HqLA4DkXfM5m6bGsa6mbzN4IMN7PlRSxDGQC82/I+tmVvSP9Ve3fi2kLm7\n2CxPx3EMGsVWjk34Gm+X7dtWS+lDGNLaI3g+kk+ulwmFsPU4y8KxUVVzs4FS\n/bC/\r\n=tmbp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGB3/CRAQ9d4VkqcLgraRqKdwialh0otv3zS5guptZPLAiEA4MKwqrItC923phes2xiT4HgWKnQ/povoiuzNzdwOk/A="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.5_1638787072399_0.9569462359834708"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.6":{"name":"ipfs-http-client","version":"54.0.3-rc.6","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.6+80ac58ca","ipfs-core-utils":"^0.12.3-rc.6+80ac58ca","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"80ac58ca27cc9f21823a23d1e6357f738fdb6781","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.6","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-cng2sNuLA0W/inpj7mORTqhlkWUtwrlVnpZx7wLpBLLd98Li75X2oG1wmR7LWEgjHVKKDoY+gDkwrg1GhZlIhQ==","shasum":"5a7843046b1364b14bd67be33d4d7f9a8025a984","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.6.tgz","fileCount":609,"unpackedSize":567300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrjpOCRA9TVsSAnZWagAAn68P/2SbQyH5tkZuvu45pwdz\nTk+otIg79NjJQV9xX2JDeMZoWmrZ0bX4ihUiVzHaD9CLxJ9TLfKPrDJ3fPwl\nqLmgVxF8hV+6RRdc2ljeK01Ahk+TQluoQccaAKqiI2Q30qM94F0V4PXjdPyA\nlqOKNXgHzeoP/71UTPvZPtg2hFkObxcoZu93HCfXhGD2TBb1MNOqVdCMzc6K\nJ2V0XEUgWn7arXPidzVYbEob5P0ZRLwLnioE/jH6y6X7ZrK0+4dU91CmTXDS\nZXaK7dw2AeRCU8+0tArnnKiuQN2e6c7Xk5Q6JPc0jP7XSkXyy1Q+qNMPiXlN\nGJFXX+8mRI0B/Tn0160ohDSZL8rxOQkX+jLX4RpQgUL8Ks+5OuZhTw7/NuLW\nDVI8IphWAOeMd86QFhYpxqdIwk9IWMd/UoSNgmLIYqRjuJJOLL1dXbbXS3w5\nzidd8Mkbwo7z6B0TKhnJ8JCZFu8PLdxl1KZ/pIV/An4/1EMjb7SqxQlC8v5y\nTdXA8CiTx+CTY9VeyTqCw2rdxslmJMLuIIC5jT15ChkCetQGU1pPQmm5TpXE\nXp1/SGkUgUNe3ZMLREMYFFr5AoR4bGDG0ryH87RAMFSuhTqouuYoxGWtsnOD\ndK3FkGxsmG+vx9S9FILc7K8vu/vc6Gns/kR4qfg79R1EiWbiplVjnSA4pnf5\nUk9b\r\n=NwRb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5W4o62HB0T/09wYguyuzAKLu6jGgIK6xOlsfMddRyYwIge7LMRfc7CUcgn1odu3TeQb8u0glGCCBDuBe64dQ7zNA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.6_1638808142327_0.9217058088478203"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.7":{"name":"ipfs-http-client","version":"54.0.3-rc.7","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.7+c083645e","ipfs-core-utils":"^0.12.3-rc.7+c083645e","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c083645ee68aee2fd40f0bd63fc5b4d1395b5b33","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.7","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (linux)","dist":{"integrity":"sha512-l7PBmWcu5YmLheTashoSZHRTu21n+X+hfX+FG+nzr4nOQhFCmTvnBAxsocjmqO+YDPcCA/+zJzwP2vEC61wvjQ==","shasum":"b7846624cdd47ae745c29091d0f2d673f8c6f9d2","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.7.tgz","fileCount":609,"unpackedSize":567300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhro1wCRA9TVsSAnZWagAAlIAP/2wTfmyKLSM5o+yYg4Wd\nv5AHk9fdVkfc7nEs0tg+HQYrE9m4orr1OxBBjeBaPKJ369+GnA5YKFlJQUrL\nm1pN0QIjVZdck6aud/VMKv9rhTFyiEgK0jeVDPEiM1QWmFy+FBJZE1+Vnk/N\neutm5XlI60VOQ8Xk2uvliIFaQPHhAS1s0pYBAojwEMYXAXmTDb9r+GZERpt0\n5++VPyBL7g4b/4mNo7UnfPwazRBDz8nSY64fC3POyYti9kNx3nOgVMN6W3B4\nOcoJgLGHaHvE/xN9JZfmyuAPH0fwNaRnDgpn8mySdiIIHYGTP0MkXrUcjGT/\nJbOhtD/KMfImoJhwzwZpMMEiDlAMVQ931vKhWD6oOj45bI6lpsQg3CJcNi7Z\n7gLqfrkLeGtxsl9R4cFUZeD6fkEyIG3s3s7hOzp1EE7pSdsAxJgPXpIVyrqE\nzMEp0ga8nkqeQPT1EvMmjn1Ww6ysMaJEAdSLpLlbxHBuDfZGhAGceOAl39qB\n9RjE715KmlrZ6ZAYqwl/jDrDGE/+h8VuzFWYr+p50ziaqj16nu1qneWr8Hq7\nPc1eNasja4jGw5Z6KFVgNbtUAThMlzJ7b/8w8qjJCfXCo/0P2lkGhtNVQoWt\nLxPTCey7Xs0ISIHh2PGNJaWd3NPzlT0NCXWV5WflkND3HhFwNNKAXBG5bwaB\nDM6Q\r\n=IEFf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrmPvHZDrRfPOWGPiS6dppV8pR3J1gXBaI5+V2P4j2MwIhALallC3DaXF0lKwiOkhxsdJouda3DVACVJz7849koyOe"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.7_1638829424545_0.7667996906699694"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.8":{"name":"ipfs-http-client","version":"54.0.3-rc.8","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.8+dec9e4c8","ipfs-core-utils":"^0.12.3-rc.8+dec9e4c8","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"dec9e4c87ca7829761ae6f63a4809783e53ae558","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.8","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-sg5r0o+1sgqvrJFK/auEn/Er3pcJDtofsTf0PftNV79IVADaoxNJRoAoTuY/0ludP155x0LUV2Tj6cuoWQDE9Q==","shasum":"1f657ba29d772d9db3d241f15cb7ab9104301edb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.8.tgz","fileCount":609,"unpackedSize":567350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhty/NCRA9TVsSAnZWagAAn80P+wchnrf/fz9Kyz0i4HdO\nui9V/V1Abcg6pZFJu5dOYbsRXHX6WzfICbOsYLRNbLKFPRP2IaFsBrvO7pQQ\n2QNuC8/ovTBoxP4az+Rr+hO2Q+HFCYf9YzsWneTg6pg023SgMvsd24jIA4/v\nEWOm5HXMlmUfKJ0Q/ruC4jgB0z+9lU6QvXQHHNkRyce9BiDX/3Rs2Pr5ona/\nBRKJSUIgsioZOE1fbA5PCWbLYQJdFuCea4x9isgIXEtSAtX0hu1wQSQurLQx\nmcLDjxzmmt59Xceq98ZG4+N/l+KhHwnT5AQc7CpmDuIHZptjZflcZXcNgAna\n+Hr6OPgwQ2gjDNkSfZxyXPHDNcWzrALZakBNxW2IR6WNbDXAFGH9z9vEmfZ0\ntgPh5eCuqQLgU+OV2Lp0v94LHi5gJH6dWAVbyqFpSplSaLUZ7anhzsToi9VD\nc8kI3XZvhKihQb7pZPvWbC70t+1ikgYSLkPOmyqKKz8AvUEhTyyCdnaoqMsW\nxiAWrASWm7BURxMCBYCXfLBeVmeh2drU58n+tuQo5LhNHGQEA4yoX5n0etEx\ndvsXwcLbcTdIQBkUDMKm2sUVNXkvpNIrxp4srT5fQerZ0TuL8kPA+OdF8DGB\nQRy1YiTfN86BnAkThlVgq7LQS3Qsk/SDZ5Cl16fwp3wkJdhFr2CXk9KsLA8n\nF6+q\r\n=qlvI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmfAW/e4iNz6KwAyLHK47wYp1cEkTExKtYHA9BIsltUAiBdPLUAmDyY3kXes9WF6NcsxXLcgj0EXnTqFUSXTW5sew=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.8_1639395277621_0.13711490506247515"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.9":{"name":"ipfs-http-client","version":"54.0.3-rc.9","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^6.0.5","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.9+adde8c13","ipfs-core-utils":"^0.12.3-rc.9+adde8c13","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"adde8c13ba433b81e76033c418607be389fb3d31","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.9","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-uSuvhgfMT3Qn0wJAqdP08fjaBQ8CWyxHgu7rF6ZdqoX0xuj3uA2BQQEYTxwxzwjcwxMmrnrkZ/6MP+Gj2ZCztQ==","shasum":"99eea0b2e6ff0edbd302bb63187b02b8cf3b2ad6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.9.tgz","fileCount":609,"unpackedSize":567350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtzgECRA9TVsSAnZWagAA8HAP/i0z04mLzoATdcoFUTwC\nWVUZJTnNd8U6PdAcWQSFHFmIV1LxnUX3MCMhSiJ1hX2b/Zi2voRhQ/VFr05o\ntIy1SjiCaLB1dIKg8HWJ9yfV4frwnibJl/KD8UEk6aNEMcjzKnOOd9ge7q4C\nqAqFxjT4ESoJKjV5DrCsRwNpD3xFjEaUoO3M76IrG9S2iJkKE4kDw25vzNjW\ndVmVdI0RalJE760jCsGUOS4Irlp1jj/SeqQ3iM6s0d5Iirm1ihR4FQq80WWI\nmjXURFaakLRjsIV0Mx5AIED9NBCL8j4gX48C20Gi06OMtovsSzei8Vv/uJq4\ndF7LKorjP/4ElycNm9vKKALc7U+payF1J1TcnMBic+C5cglqRVhWUv2upmhM\nAVfOQlaMmjOkIAPKoztezNZY2mZOFAaYngDynxPfqH8EeZqH3jggcRmknF0N\nZhRFevb9CZ9x5u/AAyrxuJveHi+KzrHFN1y2ORYAGEOAC9mJWrds2ilQXFi7\nv5psNEBd2+OsVXTJNVUs8CqIEHHcG5XayBb3LBPfNEyQgb/WMhBjj+wdHwoe\ndmT8y8yT9sEQUBMcGmJu/zUuHz39noFd7BaCxAU5P7kGMnT5GR1WW3Lb1x+K\n62QxzhdJE33Tj+MifA9emDwv5KS67fMI3XMc5quPa24GKRVvPoS6Iq87Mu/q\n38u9\r\n=GX/Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYjTMKQ5yNdrBC3+hqmOWgwuO8XEXeVz5S8vsoeCn/5wIgJ7ZUHi9ac8HhLaM07/ttXI2ohRyMM40T/XJWHoUZI7Q="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.9_1639397380092_0.4643624744856105"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.11":{"name":"ipfs-http-client","version":"54.0.3-rc.11","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.11+33f1034a","ipfs-core-utils":"^0.12.3-rc.11+33f1034a","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"33f1034a6fc257f1a87de7bb38d876925f61cb5f","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.11","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-3GU+y6VRpxmKpAIijabbXpLeKvNxWq1ucYog3IGeZZ6se42fdeUwbYECucyHrVzHwsrF1X4UUSTv2DU63mAVeg==","shasum":"3f0b675cb156324fe5e8fe449ddf25fd153f1b05","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.11.tgz","fileCount":609,"unpackedSize":567360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueSTCRA9TVsSAnZWagAAUJoP/RWbXB/yirK8TlWs0iRp\nSqVTAUQ9EQqOCDJKt5HvfF6O8OwlcM+EQleXoq4P11hxZZ8Qj1s3oS4Mj8wf\nSqThd5ps3HnBNfBaBfcZ0FNrgHGd1I2ThYUw9/9+VHF3RM+QuD7fYPVFK3aE\nwx50CCRtOKLG60AEgg5oCKS+hab/xfCLC5ddMRyeu7damsgGOzUpY5GHNrfv\nZXboI5ocEY9N7UDexZ11k59hSBwg7PCRP//Ro3xamdp55jrQLy5FRnp3fCSM\n10S5PA8hrtHTUNsBOhanHiTpOqpL9kUpZT+RclFvZRFU52xP0/+yXH99+Eqc\n56wp/nJKaVExKg7OyoQfbt7tzFJP7zxU2K4hGm9nACLUReR/CI9r9ExdhoKY\nWkt4eZwigs84BSYMXPfhYPqJobfS3UAZ7SP7sc/3JAkk3XpCK/dj6txCPIYf\nQxgI1XC+hbP+MZKCY6nTtid7beZxr4vHku80NKaXIeZyHFHxh8LV6828Vq8y\naBtl0WvDXTsNELwFa9ZJDpymL1oAMgrZ7KUsN6mx35hWIxxP5jBBfKa+KinU\nQz/YAsRLVSznW8p7rv71F4ecm/5jIxfc12i7xGl8jBHxrwNDsSpsuXWoKfwt\n4e7UKQX/Tdr2adsojo1GWoviSe+5fXqdIp4b/puzH5N4a6qmaahuajd2UiPG\n4wW6\r\n=Ly+9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdLYJbdggzhprZZ458P9YkWW3uW9mH492ss83qVcPt0wIgVSloQkRCpw5edbH+a1+gG6oegcuSSAEP72yuf0DNIFQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.11_1639572627128_0.1315560545141885"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.10":{"name":"ipfs-http-client","version":"54.0.3-rc.10","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.10+73476f55","ipfs-core-utils":"^0.12.3-rc.10+73476f55","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.10.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"73476f55e39ecfb01eb2b4880637aad658f51bc2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.10","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-ZY+x9QhkuLCZcQ+XsQzZQ3DEpzv6N9OQaIcKPuuwhVFX9nBxavh275upPhsLh+1DH9y4etyuWHrmZjBHPD/Z0w==","shasum":"2006ff1a8cd625236492f7a43d479deb26e011b7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.10.tgz","fileCount":609,"unpackedSize":567360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueSjCRA9TVsSAnZWagAAiNEQAIoHx4g6Jtem0zlBX6fL\nqzuYZNnfHEOA/LDiTC4SktRUXoZR8RKjgpYWRGfF/Ak4vnRFOA7mgFe21nRX\njANYKynuvsEgjxKwvPGFTSxEiXEauF8zMvc+78w8njt6LPYAJyUZ4LH9r5jL\nlmNhNWMdZDZL+gBTQ6UL9PwTBeRuX52+gKJHFx/41u8ID06zj2J9UBt3Jhdp\neqCaG5Qy8Mc4ThcjVE4XFpcHHHY8qiS87skEdQdubM4svqvNS1zQjDSCqIpg\nEGINbVpeOlSKWeTXDKJSd3QciLaiP/5yEkXnuN/9qf7X2PopUFXL1ILoH7se\nMupL0g0TEPXOq3CooOb7/iUxhebcHTV0bW8u6WHQ7+OKD2VtLPj39XZsF75K\n8Kpb5WNDwm/FqAOIKCsSKXUsJMUsmHbU0QvPmyhtJjbre9Xi/1pO5toDjSOc\nMpiP3mHjfumnc2aFA+FyWDpglaie20GIuD/4hjg913X+/Z9my92jCuBb+sO9\nrRmlAn9hsUazPknoCNUcmeLOT/tvHfBLwE97aV58BFBNvOzKGKlNXg56+qBP\nbBX13TPLtnVq6kCS33Rk8CvT/OVCT8/WtCbxIDheNBHZ9mgN9Dwx/LilkX+l\n/UA/Lg4Y13wvzkCrZucc/9lbRuxUcNGenByvSrgnlD3uYFWzLJS/WzMyHbvq\nZyG7\r\n=qpTN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt6UIGy8u5bfxb/vqjgtFxIUj7cPto0KRtRRjIPEQcAQIgSb3WBRv2OCIO+vtEx6aI6A/svsQNs5gHIaego4axG6E="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.10_1639572642902_0.9834375292480753"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.12":{"name":"ipfs-http-client","version":"54.0.3-rc.12","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.12+6eeaca45","ipfs-core-utils":"^0.12.3-rc.12+6eeaca45","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"6eeaca452c36fa13be42d704575c577e4ca938f1","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.12","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-8MDGdnYS2gIsYxsh240YXfUINnVP2XHRCooTEM6kNH/VpAp53+FU8Fd/hwpaBeBuellzX6f2pkSvhd91UxE4cg==","shasum":"1d612f7f3b2971b72f53bb244cb5c5e3bcef2d64","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.12.tgz","fileCount":613,"unpackedSize":570672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhueUxCRA9TVsSAnZWagAAYM4P/3JeA4dUu2+BBq0QzTp4\nSGJYVOQMNpFJAwBMah6IwD7IKLLs4SlYAyJO2gHz6Xv1PswzfrLZTXx91y5F\n/Mk1PJeG4N/RjswBmVlEE418SvAfvj663gzvwEnl7OzDZzzVYlkrszPhTqh3\ntiJfc44APhckX+2jqmt4T4+BoDZL0F3QS5No7PV8nKnSsYdXeTCGcutvTeJL\nxLAzgPHQV3O/uwx9IFC12b82BFlqBqH36xCQDdvuxJN7h2afEHFqKeCxtP58\nXm1Bvliwn2DqJcf+LXHiLqaBg/IH4wSmTjnK2/s6ua8rSiyAAaHWaKfJvD/m\nLr5zouCtroqkgJCRgOyxMQNW2FQUMCwkhO/gXGE4FsplbgvtnpPErjYoph20\nhn9ikKJJyIdEkeVVp/FK4T3XPiUfNnTR6KerD7j6KQ2CZLbsYZdstX21JjrO\nvZpHExAOXwpxGr8UU2WvWaSpztZxp8f3MamvQMhXAXpo/eSfHv4aFKcsBHFs\nYwKuxHZ9WzRiPVfszViyMDJT81QFPAkDy5c9TKV7YXJYa1jpIGXtAzHMswrs\n/a5VMvcZNpY7MQ5FqRMQ7VVcKf8XIBFvMBNEEy01yhvWsMiy0jBVakNyIz+T\nW2MXtU2+UK/FelA+vwFeiDoewNCZ0OFos6SdIk0KJrzWEpJPmcQsCelYZ4RC\nDskF\r\n=JOtL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0stAxMIs8DqNkxbMladtidnvsajhTVgYFLrdlKl4cLAiBp2ptxh5MHZQjXKjC4jS6Ezjy3c2QAyIoKfO7brNcmMg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.12_1639572785459_0.9882909278210781"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"54.0.3-rc.13":{"name":"ipfs-http-client","version":"54.0.3-rc.13","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.8.5-rc.13+d147494f","ipfs-core-utils":"^0.12.3-rc.13+d147494f","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"d147494f362d38244bbeafbd6e7d76789c7c5020","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@54.0.3-rc.13","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-ozVU8c+ka8jq/7YCwEotOSUVX1+GgiN6Zhd2naOZB25q2Zdr0QFCzppT/gza737E1bDLyrEnrVoFiOKS6sbA8A==","shasum":"b69b7a0145f4a60b69b5034c486f79b991597d45","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-54.0.3-rc.13.tgz","fileCount":613,"unpackedSize":570672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhujMLCRA9TVsSAnZWagAAIAEP/j2fgVZ5c4eYf7Wp3SOI\nA5y0xgMweXpFHoRxxmanHBXZOzKWFtdElAisj+Yka7s8d4qb7FxQZ2WVeEZn\niw1ykzLvsHgZ8JVTvyBcF04heNqhXXvpSdv1RQTlMRdGpUGNEV7lrR7fre6W\najusZCFtnKGRLhyrrz+WTbygCM0HlsF720lIELiGCGQthq+nLNvfrIYmtdN6\nf/CTl70GEwDgXDYVk8KWbt3ctRn67rsnKhGZJ/dF1/7yvdD/rLQ+jyu1Se9V\nd7OOBZ5fYpFaHxafWbzWEfIkkyCoXY260OXSl+TNGPZa3GHWeZupXHsfLtnP\nYypqJ/bqPGpbsZ30/nwKT4cZ4GNpHF7+dCIEXlxwu1eWKI+r/up5QkSHt2d8\np7e6QyznXi8nRXaAXLgeTdcHoAJEbi2pqfnPvwZK3vMNYl82OPXrazBnVmIP\nB6b0lJ95xHRBWBX8rEpLZ6YmVsDtw3oLJiOir/5YHYMqtZYEevBmGiISnUBY\nxYQZ1t6xNADH1keLY1WNdDJmYLVWZPZ39MLrcsleHOjOQnr6xeWELHlG6z1A\nh2erbsJpFVSMaXUlHT6TNIS2IfdRzeYinTohcJgnjZsIrXmA70/U1twvr+Iq\nwfOlwQn7smaP9VPXv5X7FrGd51jJIVbgMbCCymy1WFk7rVKLs9uXScrfc88h\n9MxQ\r\n=iL7H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcT8U2vAhFT/u0aUjaARcCEo4q3uzmaeV4IUTXV+xTYwIgUuI7CSNW/1iHR/L5Z7V3+vzq+PNNIE7T6Pt6StYi9d0="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_54.0.3-rc.13_1639592715452_0.5948934709273626"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.0":{"name":"ipfs-http-client","version":"55.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.0","ipfs-core-utils":"^0.13.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"7375caa8805298fc671ed4080e1023aafe756151","_id":"ipfs-http-client@55.0.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"integrity":"sha512-GpvEs7C7WL9M6fN/kZbjeh4Y8YN7rY8b18tVWZnKxRsVwM25cIFrRI8CwNt3Ugin9yShieI3i9sPyzYGMrLNnQ==","shasum":"8b713c5fa318e873b7d7ad099a4eb14320a5b0ce","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.0.tgz","fileCount":617,"unpackedSize":571067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuk/ECRA9TVsSAnZWagAA/MoP/iSVV2RHIFbbrrY9QUEz\n9WnV5OQrLQcPvSLpQuDW04HmYxYa/WD3icp6XLjPdoatltHGnW8q01yzxihl\nvWGWh43EAKz8M9Rbm+vuGty4mO3sIGv3nyXtH7tN/qnwt/5GogCcsnHgqR77\ncCOvpYTNrMRcVNow4TKHoZu2huVb6rq4XDIjtcf4ByYfQQcXvpVRRkjjz/bf\nbBr3MoSjkDkNP6/AQDraXVcZKDHukFD/v965O8+ee9+Bx8+409YbVb1gv3AG\nRZhhFcBVIypD1jVzvdujHbm/1Xvfa7s5UCvlIUkCBV3Wsw1t9zluOYowdADw\nb9M9ptfQaLAOBvzGdDzicE9aI0LjVlQK6nGhOUYoRi1juVXIbakr9OVLW6iX\ngQFo8oyJdKM8JYmWrk/HUUbOhsUxqvwQlVa2QfGarSwISe92MzI6sAKA4epH\nM3py9rprGsYF9/P9wiuxkmcZKdzaEKMlqIt0KIrISWQ7zd+7BIXyr/Gid69/\n6WTUjzKwpUyNAUnm1azUUs68WTFyi31JrSd85RrJKWqSz/ZIoTTwd7EfY/9e\nFjHmODakLb7iCJAoRtsOVd1EabdO4QhaFBVhU1ONW/iJUvCf/VMLA9p7iqTQ\njEt5R9mEYrdqtG+gKKAEDX2Ue+MeHGJSoHN85DteQzccZS3K6JblwEGzeyfZ\nUv4N\r\n=f+f8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGV8Ti0x6VRNqXhPAhZU7CJtSWJXhdfJag0ayZLIMPOgAiEAo0Bv2hDB3AqDr6jy41HZgQApZOknc50CLOUdyDzP0tY="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.0_1639600068603_0.6696996227317757"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-rc.0":{"name":"ipfs-http-client","version":"55.0.1-rc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-rc.0+7375caa8","ipfs-core-utils":"^0.13.1-rc.0+7375caa8","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"7375caa8805298fc671ed4080e1023aafe756151","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-rc.0","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-qWcHoYeqJhA+Vjwo9RQlA1zGHRxmNOtVxH/y+IRXmLvagDxcGGnVqW8Nj6+IhKDQHYNqGHYVwprdA0QXmJSeTQ==","shasum":"0f8b150a57f0bf32b8cacffe6a9ee4d3be0fc2fa","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-rc.0.tgz","fileCount":613,"unpackedSize":570669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhulBDCRA9TVsSAnZWagAAMGsP/2oTNPCjGJWAjHfd62p1\npS66/uKZWuZ6wWoCBIMav+iTzDeVO8S8GsbkxkDP+rtxAwlp1YVLbjOEpZuP\nba2UR+qmS2sUwjr1ChWB+l3oIpEz4zx+KAIkG8kfSzhhxW6LLUryrdoV1rsS\nu9Kn3Ls4uXOp36It46UXn3SITAgpI4VXwTA/iq+WBjw6UIty1Zl6eTwLurnv\nSaWKPGLWgK+UgwELR17g48CZSz3lOgM9H4dkgcwrbxzMqVKOxh2iD4MwqEQ7\nKWAriVw6ZZdhRZCbB5AwSONkYhKBa/K2VP5ANqF2v2fNJu/zvLT24PC2dVoR\nr7lhrwPXzgAR3RARjkauOr9QopNDETYoQUGSnwKW0As3p4Q61EyGyRuPhSc8\nlaHDiB+79acGVrmo3/qk5FNgVkN0S8G48WJtX54Q0yC62ziSPvGgMLEdI7ds\nkuljmWhY/etkiqb//xBG6wEBwKb5h4/GzDaKfD6KTUDUapuWR3HoNoKzzCRl\n3hk41wsXlXnSjNIOd3iqA68z6QOyC/zLwBSvSybqypElgB6LQARGmjWSwDfw\nQeEYhE4t8WLXLUNlD6SzARQyLLbfqC8xUEy374i2Wa+9ZEc8dMyRTlMOTvxe\nki0JlJXUfSPvgAIFXj3mpbkD75VnsjsZUyH8scCororXaL0DB9+Q8AkGDaLe\nxe+/\r\n=14IA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrrdIe+XAqNmpJtvgbHhV4VcvieFkD3gRJsk+EsSW+eQIhAPS2ky/8ECQTZUizT1miOZ06hujwhghHZGwYbcIGKx7L"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-rc.0_1639600195104_0.893470633987185"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-rc.1":{"name":"ipfs-http-client","version":"55.0.1-rc.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-rc.1+880e47d9","ipfs-core-utils":"^0.13.1-rc.1+880e47d9","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"880e47d98cd89d774d707d20bc4a3db8c0d3c5cc","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP API, implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS HTTP API |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-rc.1","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-6tHWOQ/BMQNXMF0FE1L4bR7YrH2t5m0Q7CwvScUbblF69Y2zWkQ0t7byFrkZnpfpgJJMbt2LDw8SneT30XA0xQ==","shasum":"59b087c5a9cfd17317477ee7e7825a8b01c43ec9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-rc.1.tgz","fileCount":613,"unpackedSize":570669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuwGrCRA9TVsSAnZWagAAF/cQAJhDofdBAY5gNFT2DI9Z\nXjBnYNx4TTEmJtiBHCRRbYtI8rHXrAP2Q7JMzeTk1lBO76SceC+CW28iVo2t\nj78HGy/FFmCr2AV0au5OaKuiIdloshZ2a0X6lCHyY5GlmRnc4aqXcjOvpIv6\nswkManzMrS8UMHf++63j9YJT8Gd5+G+aUu9SXOtg4KFLWgdFBc8nqrLBg8XE\nr0dm6yvudic1j32uAmYutZ/OXAMkLE181vQUakZDPu3joMO8l/g0PvLrf0fJ\nMGu7aAvZxihpmbBa75tsjMPmpDoz7utRkuVJcUZCb5xtttbbN4hsgXw/cVj6\nHEGFCU1BMch4OafRsphFjMXzTrdYJ8q38yYQrVuwWIZheF6NUuTGBfmmjMOu\nybT3UVr0KF73NORGx136xvINlhTkAnXKnVdE9kBrfddysTdRgYWdOgTeWgCq\nJiluz17NeUVfcdZRPfQsx0/uDE6TNhWit3zH7G34qqYJvQjU06bZbdHH+LGP\ntpY+U9rcYDyQYR/z/b6089E8C3/ivMzq4p+u2VIaImljbQDnh5jW1XimsZnE\nnkqtCy5+7ChzI4erYyCXZx+zs472Nc75CpIlo+iULbWGfqPoFqqKv0+bH/fJ\nNl6tPr/awlrDHHNurazLZVsrQ+qDVrSq5eGAUs7Jtbbwt/OPp5CgHCOl87x+\n37Yh\r\n=VzJ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWvidKIxJ04o4K3ACvlUKKiI6ZlGhiqqHllkvZ7Q7jTAiEAjhIhOFDiv5KCD4UuPaf+XC+ZQzzAhrBPAmOlhKUE1lc="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-rc.1_1639645611011_0.37301428065800346"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-rc.2":{"name":"ipfs-http-client","version":"55.0.1-rc.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-rc.2+45d9baa7","ipfs-core-utils":"^0.13.1-rc.2+45d9baa7","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"45d9baa7576a0ac924f3d01d49371bf1a4cf654c","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-rc.2","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (linux)","dist":{"integrity":"sha512-9MBitL/iphq/XDst0OU/1HPZ0fFwxWlZhx8KMYgIdLZTWfzFr8pOLISlrUoU67KSzZSubCPBTGEeVMddw9ZZIw==","shasum":"895ef105e54880cd9d8c1cf0cabfaa968182f341","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-rc.2.tgz","fileCount":613,"unpackedSize":570743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvF79CRA9TVsSAnZWagAAtk0P/1/Ao0Zq/cg4FuTf5+Rq\n/WarDRm8PS0zDe3F8HJEavrNdKHUZYGNXI5T7yL01pPLg47V7CKDI4K1RtS+\nEemEd4CiR0O82+ljjeEp9QAtbhVNHkiZN6H0BqYQow8vpOnQALa12wTvfiBJ\n9XoGQV8FIFI4TIcNlEZevZ3W51j7Ax+WHwasw/i7ru562Shy8ynSoFAOEx0D\ndNhI3FCw3nSOoNXFtbCrUTsPTEdtdpdKQwI6PBV/ZJ9pYnWJJtPRGCX1T8P+\n46zVMngbKMQ7XKiMPC/0GS89nPj/wBOSlN/fUPWkaTS715fUmpCCJQPIjcqf\n+y8AZm6mwOJEqiVzt/XwOxtHTBFhmph00TaXNEd3rGGENLnlbLtcThU2hV8k\nyNMD4OqDmUHi9jzk7XCvkRNtyeqqltkKDf4ANfcqUDvxu679E6/9ObUSfZnJ\nKogoAJ9ANLN5ePL75yrcauW+C92cAV/+WsSQav/BpHP/utP8r0njvzpNvQrw\ndYX5jOC5/obJyUWap6s2R+ssQDxOoBvhK9bc2VR3Mo1y73L028py05QhWUAm\nvU2vKaN9jmaXPr/ZMsTYnz0g1VwI/c7E7r8OB13e3Da/+hSKNo4ea2bwUooB\nK4QWfGHZ64LWMZm+9ilAMJ3kLJTd88j+bMKRlRLIZa8VUjJOklnAPzoQQ5b6\nmKBT\r\n=93Bj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICj5s9mGQhmNeaA87R5Vouk8oP/FQ6j18JiRg2Xrat5sAiAkygtneJx6IKgm/FpFwSpiqnCFJVToajNzon8Q4DiXSA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-rc.2_1639735037277_0.46748235693917795"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-rc.3":{"name":"ipfs-http-client","version":"55.0.1-rc.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","abort-controller":"^3.0.0","any-signal":"^2.1.2","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-rc.3+67a8c47f","ipfs-core-utils":"^0.13.1-rc.3+67a8c47f","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","native-abort-controller":"^1.0.3","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"67a8c47f7eb4ca93ea16defc24b1ebdcf4267971","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-rc.3","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-PmjHVjrQp+3Jnq5Axw2Qi7ljk66b9aKVq3SGaRDD57OAhoMCxVh2EkOifpyUg2oR4cLUFF8h8j4UKEiD6S6x7A==","shasum":"67b952a906d9e357462238237c67f8a1041dcd06","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-rc.3.tgz","fileCount":613,"unpackedSize":570743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4G/4CRA9TVsSAnZWagAAju0P/1IGGcA8RQBVFtPPjcd0\nwuT+YX1Q/gS3ov0tdZVzPVHf1lSm4kW4poE+dh+I4IFDoKBqg8cPuhvHSk4G\nL1i4kHNdjGl/TBADXEdOKAxI7ekKegtyvBFbPrmSsQz9NjtCIXPhCx8MRa3A\n1iO/PpKRKJfbZdcik1MRVVLThPyaOTLmygY07ia6Wv7rsZS7xzheZd4uwJuN\nL6g8zAsizOrUXoUkDEABREETV6lwgc3eo9nyjV69CGNOds1qHlW1hyZK5P+L\nlWkS0FhA0fkcMFvK5Gwj7YzoOyCydJQoeZ/ZrnKR/dI4NLCZU6dIh60prp10\nnvpA72RC8MxS9PpiGCD5uKzldHgMDz9FLIt2LYPAH9bcqpyAL4R5627o5Z6I\nvmkB3jOenNl2YXJQKIIO7s/DiRRXkzwOy1WvG+x+BgMU1qJOCMi0phXgP1Vg\nVcRGlA5SzlcVHhernNkWs/DwCatL4bpsZigHlrFJ/qDw3A76M5RO/K/GwELs\nzGfBXm9M7P8yIdhUTvyzH7UStCVJVryvB6p5XBm7gzTRxDF5cBzfv7AWnmfa\nJjy+luM/OBrbBCF3aboBpQkiO9tWaslG1JV5gM9UC9+ihckAOADWixoSXB/4\nJKYxpdo/tiHSdkemcnEcNV+Vee1nfFllhG0LO/8+x0rG0d4/dkq9iLrjuDQk\n9+b3\r\n=25TP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq9+4xYykGYCSrTH33rf2geQFAgXph/36pXmvZ1fvkXAIhAMgXlkoL6EhTGQMmUc3/SJWJkAwOPA0w0bwokPWJdsiq"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-rc.3_1642098680597_0.7049653795525825"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-rc.4":{"name":"ipfs-http-client","version":"55.0.1-rc.4","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-rc.4+902e887e","ipfs-core-utils":"^0.13.1-rc.4+902e887e","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"902e887e1acac87f607324fa7cb5ad4b14aefcf3","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-rc.4","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-3ZEsoUqbpZ+GV2jECyrCgJpCa/tZ35SwqMgmKhGIhXc05z6hrrUxEh90SoMh+pDpngEclAzma9splWg8tZeqvA==","shasum":"9be72faedbb00ff71fec5fcfdc70b6b73a211494","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-rc.4.tgz","fileCount":613,"unpackedSize":568553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XEdCRA9TVsSAnZWagAA2ogP/Agf7dM0lA3F0nZjrkR1\nH+ZUs5bhmE+i28qyLTJmT9HL3usEYoFjn0cizR5bfxpIbl2jaayYnzkfY+oH\n571KG/D5gsGEkZx6vc/ZwzrmlXhGpMKlVG2K6nFjNEzOd4/ymaQyFYrYEMHh\ncQ2YUlOT3WMAkmgUnGA7bCYbByc6FsRVmPEkaLas/vEVXgZS9y4QysqfIKGB\n/yTewTfwsXLLQUKhQFduzb79hs9OXQxD6rRiaFjgL27u4geXhFPTgLozNOsH\ne3wXksvuz8DVRs08Cq/4R5W3bFVxFrQU65xlcst6s75ffff/3vBl5XKsEVZ/\nyuzgRX87vQd7OhcwNY658yauScg2h/JwGBFdbq/HqCw30T5vrCGNy3RkmILL\n+ydhz6xcVm/usS3R8coq1K87loobiG1CHc9UCmhCJ1H9PTz32JkHQjlmictK\nHnGveeoDBTeqgxDI79NbXWFaZOFXmyd1dOWYMZS77H0zpIerS7UTvpo7mvtl\nKom8fjJX8Gj6JMcXt9wkMIjj6zz8TS8m8CZoA+ENAdWxoNcdwMeSGkLeBFsN\nm+Gm5WjJ7JkK2jUgr9DZDQ8XEix1/bwlW9pdnTX1KjMoOsOJXkaVScdU2Z3Q\nFn0/gxz9HCU2l+8HZDtf6Cap3Y0W/UM4XKXWr2F+ltSlghMSvODkG+QbmaTR\n6Vrj\r\n=GJWF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDIFDVVzxoLfrdN5uWMQkBZerTNOfhKiQDcikD6VcR1yAiBrSGSA0qoErE1t7Mal0ffE6Fv1zj7GMnx6xHQHHZBsqg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-rc.4_1642688797107_0.9068859938866214"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-rc.5":{"name":"ipfs-http-client","version":"55.0.1-rc.5","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker","test:electron-main":"aegir build --esm-tests && aegir test -t electron-main -f ./dist/cjs/node-test/*.spec.js","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-rc.5+b9382bc5","ipfs-core-utils":"^0.13.1-rc.5+b9382bc5","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=14.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b9382bc5bc7341a2771a69b2386e5473b507caf1","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-rc.5","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-AcnhBH340GEURmaJOjjtopwwhYrcVrClCP5IWZ5VsTP2Q7u+LaqPYUEv4053QAxlpLoW/FeFEExkU2ClIvmIoQ==","shasum":"19bcf746dc5df0db7ce99c561ad9b2cd505bdce5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-rc.5.tgz","fileCount":613,"unpackedSize":568572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6tVGCRA9TVsSAnZWagAA8qkP/ROhppP854/SC9rK/Q3j\nIXxTYD6xb/eFp54DJcMsTxwZVkXzcYugAmA3M+MQcpjxEDYqHY/dPImJweDY\nT2PRgIWRfDps++CHruheXE/wPwJv1xc/5MpOZ4IX5eLXjoU7I/WwZbajUoC2\nF7vwzd0aO9XNT5XLmHyJN36GhmSKB1IgtWrNfDR0S5oDW6OUKPcAu9PXkq0A\njI9HhSNdP586Sk6Uz+z2y4pdSRUVYHKvqYyU0xzeW7DoAhFJRpk+N8HSQGTZ\n0afHX1RZS49SiFa8JtCsv0kUgzDzRhEvuzr+2s6g9sJnj8Pr4RCieTw5EBOm\nkAAuc5fLjdcD+Rj8nwjdoD/qwNc57lbFUnvj+qzAL3cp563Su8Hyp9Y5V9zA\nFMi6x4NeyRYrlzPu0easZ0AbGCJRpnMIQKfnhdKYJFCktz9yHapEumASwm+s\nF2Y6Pbies9Jrd68I8pdZl595aUtxfU3ipe3HA1lj7Dji4TGV1nesQpLpqm/M\nBy2AYwjdj8QuF025VXjXrBsbd4FigStKdMEa/Y5bocdYCBgNECmys5qz4SN3\ndSwRaa79ASw2aC5VUDZwdQ47D9+WhpWej1Ob3ur7YN62UPIcH+ADPT+jYEVm\nmwuyfXxTAbSKUhlY4f09uEYBnyhLwZ/SCAg/glYpeEmKDdbHBCz9y8NcR94v\njcea\r\n=4gF8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTd17+rCXORf0BobDbeVI2OrKRFjO2wzXa+6qqKoMU1AiBEy5eQPU+jMwn4AJPIKFZ2vW/aCNkbstRMV031Z3W31w=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-rc.5_1642779974154_0.5096054744326244"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-7fe0da57f.0":{"name":"ipfs-http-client","version":"55.0.1-7fe0da57f.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-7fe0da57f.0","ipfs-core-utils":"^0.13.1-7fe0da57f.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-7fe0da57f.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"integrity":"sha512-8Gm85Rf+fzlEK/hVi3mobP6U/4f9sK3yLkPYdPb40kaKXeCSP9A4YMc1Nm5GDpG8lRy2WthvwzpbF508+j/Sbg==","shasum":"fc8e5d435d414ee352f0fbbfc5336f0037733fd8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-7fe0da57f.0.tgz","fileCount":617,"unpackedSize":568993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8TsPCRA9TVsSAnZWagAATA8P/1EER+dYqTykJVACOu2y\nM6r2Q/HdgHHYUTBIyXo3G9IYIO/HDeCiONOjEsxNYNCRnG20qkoYqQm/lUyo\nN5DcOH9iVw3j6QxlFHKAHphwC5bIN2vvSn7OojpqKZ7t4me3IL38eIp7+wJv\nsSVuan7zsxY9J/k3H8GB6tu6Vv2Sw0qh8+oEMNpSwXF87ofY5Sj9OnwA3l29\nQsyjtkgYo7jkICOpGz6pE8bJ0GJu3n+faz6Rg2/bWqRTufeEIGU7J0AYVKRr\nfU6Ty0paKtZ71ImTyPzuOwwtBHRPtkyTfCuFn+pwLdao18AFZgJnc9H+KLCM\nLoHRSV8Pfhk8mzG/ug0ZFIUeYEwH4+RGd8kE09vl6MYVqhMOYZRzRF81lWfZ\nCj70Tpc8v2AChmLLXegsfCMH08D894xWSpHnAvQHqxS4qd5/lbUUTUgT+VSa\ntr+tckSuq6ErycTBxh0GMLSP8Xwlduqcdvs0KCiRFOchgfWh65kNchXoLojE\nIUxsUN0NQ3eIOI8Rf0b80GxwZMrS7UOJaOWEOZ3EyM9vW6r7rn/npVEoluF5\n3ZUbhGKAKRsPw9hvXUr1yYvPqsJAtCrMQJYxzJFMS417bT8V9pd0kUti8l7T\nGkyIlB5waygFGQutrih6wi5E5kAYBUXxIsPp4F7XDPN7rpcvtz7RvTWZhdVG\nVHVb\r\n=bS8Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTPihJWqTQO8jqvPDwfTVP2YjXczI3Gg2D4YDie6MbmwIgJBaAiAszrXUkyyI2/JtrSJowroZ8vzJe+EGpk5roP0k="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-7fe0da57f.0_1643199247210_0.8140061691655709"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-5439a0e.0":{"name":"ipfs-http-client","version":"55.0.1-5439a0e.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-5439a0e.0","ipfs-core-utils":"^0.13.1-5439a0e.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Lead Maintainer <!-- omit in toc -->\n\n[Alex Potsides](http://github.com/achingbrain)\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-5439a0e.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-PUohKwx1RgyouZuivAtOoHO1sV78P/L0cy/o6rNG5lqnsiSj1a3REYCA1e+Prw+2uy37fKl08AJJNBIiiOI/ow==","shasum":"05089b809c26c7980b5ef3e4ecd62b98217d7784","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-5439a0e.0.tgz","fileCount":613,"unpackedSize":568547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8UeZCRA9TVsSAnZWagAAIjsP/AsVqQsI+2DMQTZ6DQsK\nyG+I7kHEikLuZXYDphN8pc5zV21eZ/OdaQKRLDEPFimUP6YRUf28jVdaGQXV\n+H+tpRi4YRQJwadiGWVU+W12M1CKI25grJkWxQLmI1UHfWmsDFcv5RGPQjlh\nS4e6IhzFPFFsfZpRz7uNZUAJ8da9dXrE7fINg5BAL3LbXZkfr1tF6KJvZUC4\n5eItKWGk/Nhb/SAQdMdSQY3EJ5TDY5gBz8SWMgGHYVyemhyVD5+Bi2/DIRXd\nhMtZgtOXzM2hEHFFOhK05txFOzRSBYuvBpXRy/5Vtc+EOOMgDO2ZOMeso7YQ\nICq9MFPvUUoJzhKKiBxFX/GzSgcoIKxg5MJNmc7LhblFlnuxTnu3XmcKd9Gw\n7uu0JEQsXILy9pf2HaCTIV6CrnodC5YdA/cdi6vVtaH+36FtqKprJpZQFdle\n1+1L/RgrCT/pM7dlwMtlzCNvZz+qLZM86uf6Tbu3XeOZSS7KUPtv0e0Mx0R9\noDN5BXRJAUDCqSlCw2IZphhv8GWjN1h6q1phEL46eqWkDJNVG29b9Vgsbp9s\nFIZ9msqS4VzyYH7JsDaUwLYBNzhEdhZTTqKwcSml0LjuwrHYYLVNrXEyU4wr\nnaFHZMFO9+BrzL0IRiEEtwOL44ah2Bu9ZsjYJQ+wAP1JO5dfMfhq+nQ4nw9D\nwUr0\r\n=T/C8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB/S2Gk7adyXI/n0KbC7OEG6txFwe4UCwWInWBRccYZPAiEApG08TTJeODB/wP8Kv1V8ADB3H8+1mbyLPNtYFmD+fpE="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-5439a0e.0_1643202456961_0.11848557028043416"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-a6b201af.0":{"name":"ipfs-http-client","version":"55.0.1-a6b201af.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-a6b201af.0","ipfs-core-utils":"^0.13.1-a6b201af.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-a6b201af.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-VGYssBozq0t+1umlfla4DfwMySZyHGzwYAYDkcm2lbUV0TKSHQ3WtkC3FNX4NmjOJT6U7M90E5WVYfCE9IW+3g==","shasum":"86b81d1b5fd58805631ae9e9042fb546f4933fed","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-a6b201af.0.tgz","fileCount":617,"unpackedSize":568901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8rw3CRA9TVsSAnZWagAAi4AQAJA4bdyAx9rJ5CftTTiY\nXDAg+PdXVcJCiiI2CIOoGoenymqOvodyarfcOPVHDSpAOlJKfVoGFQ5O6eFE\n3G6l82Mc19zK9wSizw4arE9U8icReM0QZ5OWkqFgROwPf0eEB0oXd3aaRTgh\nnlQbzUAPQSKHMcdqW0vTYxxbcDRq0wgarLU9kcKKPi43Lce0wBq5Udx4v3xp\nNMcw1aM5FH5cEnUEChEL+5lmceCZ1xwSAleEz50eUrkfFS3sWtMAQZeEzjKw\nzTw0E8Ta7QEgmYXQ1hn7r1ypP7KyOSw8BOuKmhTUIf8CcBEGZjo0GBjLqGaV\nPtiC5DkcomHvlyvcT21wwjoLY0tR4l8GBbAj9KYhxdJyYwhgptNDfyBiPzvE\nfob7kY6ylMrzCRCyfYykhkLLlQOo4e7JWAfHjnV7Op5ZMWyIrQSAptWOO+H9\nROYO3/txoaTkVFfqYOv18aelbLQqsHiN2zyDhXtpHzz5HeU1+fe4lY7CE7O1\nSLyinBYw4GIq7PJqbXjXCuHPGpo0jQvXhVy3e9Gz51gdjK0UMJl33izh1ndO\nlin6SM28vYp/G3IpebHfqmGZtPsoHPwowsj5ZMbhZiWlWsYcrArevFJmnZyu\nJpCSVIlGb1azY1nAwZgmJc7csmpqWwQ/eKJNDCK7YB7sEq9HWXNPatpUL1PO\nPxN2\r\n=3pEq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8qBBFAhC8JoS8amAzQjrkTy8kO1mzj1m45jG+ImzUNgIhAJzYfHWWJ6pjDDJchkcDuqQoRc+2aqWaTPfrYp1utQzK"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-a6b201af.0_1643297847306_0.20275036043591932"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-fbe14923.0":{"name":"ipfs-http-client","version":"55.0.1-fbe14923.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-fbe14923.0","ipfs-core-utils":"^0.13.1-fbe14923.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-fbe14923.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-8Yxq0AJB/aO8UMuLEGz66iObBHgownXZhvY+4swlnRCyftlBlDEwRmbuDY6fmmf1TXsxzajSSezwIw+dOJSXnA==","shasum":"423e823b69b9ba7eb898c4129dbc2f4be211ef61","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-fbe14923.0.tgz","fileCount":617,"unpackedSize":575267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8uG5CRA9TVsSAnZWagAAdxoP/0SdQVHxdQ9xAz6TMMU0\ni5GM0kUTeG+KsdeLtjhMYddGgyyi93vQDO6rF8+z6LN+ub1mBdTiUvNKkpv/\n6LHu6/sLm9dE14APdDut9b2O6MKKEMyMf1qr0v07t4YFgNUQjYUsIYvdL9gy\nNOuQcWW3MSBto3tOZ4rUZCeb8HgQcS+ECFMK39prPp3k9qMKMG2TWLGWZtst\nfm5qObhvBWRtQJHLq/10U/U2jc1NYkRKDb7lRdBXfMbxfZEyUHP4QLZq0GHD\n28vQGti+l0dH3DNYVOyNkzdI9ax7+t703xqgQhpA4mDswKlwC2weHWU9czLJ\nDwl633vEBSFXoyL2b4PUobypUK/xh2OBtMkwQoZyhLFGUjevHwKc3Y0KZD4n\nwiRBKQBKYA5log054iAOyE6XVJj9L4Kl8D5hQUMWl0dCb94w1vZ0TRszoNco\ntdj5xaGI55WcIYWHURY2ggdF+LFrc/Dw5pvMBhPrr9IzrgsF7TMjQ9qudpaB\nRefqPf9BtINDMuUWyBz7azKpk1pMyw2p/zxwnQ66qTJ4IVFdZb4Le4U5itxP\n1HL6/uO7U3w2j3taj91CayqcRwvwFRyRn8S87eg1NtJECXpHyY51DC2+qMWC\nzkjrSRRhURygkry1h/SxBTQ0kGtRaNMvRkS/iqI6zBzhRXAm/3vO9Gmtw/SP\nj3Xp\r\n=X13m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM3jrfPlIxlPlR84Wm1kSuYOHA8hQEQnJhPVSkj16V6AIgQ3L1a2m9zf1rc1vsVpYo0RzwKUXRNvmNHflaDL8iTR8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-fbe14923.0_1643307449332_0.5346955517527026"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-6cb3a87e.0":{"name":"ipfs-http-client","version":"55.0.1-6cb3a87e.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-6cb3a87e.0","ipfs-core-utils":"^0.13.1-6cb3a87e.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-6cb3a87e.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-UJryQ5F8fco/IQ+T5GL1qdNDkmOibhukVK5Ed98PuZXnixpieJJ+kLr/sQfV7tGY1Z4hroYtajrZFHnlt6rdpg==","shasum":"afe1a005fb3a776feffa4860eb28a1396a4f3600","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-6cb3a87e.0.tgz","fileCount":617,"unpackedSize":575267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8u6pCRA9TVsSAnZWagAABm0QAJLGt60cs3px0o4GV4gX\nhfcPkLgojBSqkaZNQ5Z8PJf/r9YewSViTg2791Sqv3oxN6IM+sPYchubUUuN\nR1tZeaCAOYaFFGlnGcYu+zaid/AGyIDyzYPxvvllo1v7MI9yPc9M30L+6sY/\ncCKQOOpBj1Y9pw7ndGVfpqyivITz/wDsI6zOmosnAulV7tXa39+5+8PBtJ/C\nzPA4klxc7yXRcPBAAd+AaRTBdQ2qXJvxAOj2eYFyUGAo67QGJwC13/YBaZWu\nA3QJ8+xwy9yOHMjbLmEQLliTBI1YemEZHD0ZpcjgUl6TxhJ/1CtW78fcy7aj\nEq11ZVnjkwSuqnqW3jEO6qv4O1GNk+dLUJH9UAcEoXxC8wzPgAia7iC/QboZ\nFVgp47fUcLYzGapdaeezfskBFbvtM6Ncqf69LQgZFscXvCdhUpn92lnDPBNn\ni0QNhwk1b/6Z8UiZ33tPDdIrLD9itFwVbcsEwSNM0gnTuzWR0A6hSWVtOchw\npl6y6PlYxIb99eW2PyIt1ANGBsoJsP2TEt7wgrOdBvtzc6Vhn+n5nv7eVdHp\nkjR0iocK/ltYFlYU6dr2ytKrWjAVhHx6Xs+tOGDXA8XPrC0Cg7KHuhTOrDLT\n7XlvyVnRn+1DeIVso/TdfjrI+yU5ta4yLEjPk5kfpbKRVQDZ6IXFJhS/lJ15\n/bSs\r\n=zlWe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmBWA7QncX88HkwA/LjzQQ3uYS+w4nhkF4SSCnw8BpxwIgRpAnL2LtYBAcQfYqXxDeaAdraVdswde2kCnP1fxzD1w="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-6cb3a87e.0_1643310761548_0.015044189123612384"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-2afef2eb.0":{"name":"ipfs-http-client","version":"56.0.1-2afef2eb.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-2afef2eb.0","ipfs-core-utils":"^0.14.1-2afef2eb.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-2afef2eb.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-JN5J+aLfJrff7VvjxMf04AtoVzsl5ud07jgejg+PCXu7VLWOU0drA9fY0M1x8xDYtu1Z3u15mefcmElSyms2tA==","shasum":"0e7eb3da878d1da7d823014b1868c3dafafc3f64","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-2afef2eb.0.tgz","fileCount":617,"unpackedSize":575268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8vvcCRA9TVsSAnZWagAAIjcP+gIjNKyZ9vHLaPtSDSXa\ny+89Q4xuEICYFczmsial/K/iotHguTTc/rB8B1WXR4jwtrXHI4uo+wF7M5eA\nx8AgXp4XBgyRQsbI/5eV8ikuKeYgnIoMKyMO1W7aDHMoHRU9sf4H0/Gk8d2m\n7EXkb8+1SVS8xx9OJ6xka7Kh3LfFlPBKpNjFHiI0b0sBVsHuUp53/A5N/sKO\nLJYLzA8qMsj9zCtltTChIBepLN4d/SVxOw6788NlO+ZMvamtkGCEt+bCE6Rc\n/N8+Kejjjn0YK+aDNOkyuWBGRmY7uRT1+YPeCZXZxYLYiCXDY0cRQvvCpDSN\nA7JYpQ8ux0X0jHO+XbEyC2IaW3YI+sJcbbw2ORatoTWmi33vk0xQj7bUYZX2\nq42s3u/7hs10T9p6K7pY73QuXiJy7K99b6sjYj251XifWiIWZzz50RQigjFq\nkV1PJw7K8HbOw1R7qjxN5s/pVVBm7UV+zMZp+aBAJ+J4lN07KrX/d5cbVxqY\nL4vb0wrHC4N/dPLEMQWhK+949rv1vYZGP3SKak3bGeZayRNbqePvswnA/X7T\njiBKAhL8vteeissGaBZdDAeRun5C+yNYjr5Ca4ZwyBV6WTMcq8j1qxcZQ1dH\nEsotBYWKWTzf1rpGs+DHAm08Rumme5KMVz5HDJ9yK4PtqedBwy+qmOeIxKv8\n++r6\r\n=6FJo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICiYZCtM5QcHZ6QdzwCjBk7TzImAjmvt9zD9hlfm1DmHAiEAoKCZryADkaC83kIaICdbMbEeEGgt5GguSgZnvYfVQfI="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-2afef2eb.0_1643314140313_0.25233256326630604"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-3a5d61d4.0":{"name":"ipfs-http-client","version":"56.0.1-3a5d61d4.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-3a5d61d4.0","ipfs-core-utils":"^0.14.1-3a5d61d4.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-3a5d61d4.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-XLRgk+ZR+6pdQUTkInlH8dZpdy1XOB9M1lZ/Z1/NtbG5MJlAyKQ73pwBbv7QIG27WPadbakuNWcl8tIUuqOJsw==","shasum":"9b37b454a12ba543e5e7db443d7a21bb68f2022a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-3a5d61d4.0.tgz","fileCount":617,"unpackedSize":575208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8w+1CRA9TVsSAnZWagAAvsUP/R/qg+BaJcsHhdwpDwpE\nNSJBJxS9rhSqFh0SzXiGKqqyyOjG+XPQYc4QWP/yoDNsGEZ2HeUuNDajtQrz\nwC6TYOHcDAJWqImh+JW1NGvNqo+v6P0dJFRDG8vNz5/jkFoiG4voP0y++YmY\nwH5yAgYGMdgk1d9eAljhf1i2/Y7z2PNkzUWvVNTvqAlmaoFR1zWsykB/+jW0\nffgioIwd69EKsNpWKEhNiUGUNN23dYOASsOzhGvsWPrlfhSg2inC99moQGQV\nNJzNyh6DLTqX0V0bsNBj+ZuD/GEf7viV9/6haerWElltHMNZYm9IcBrf9oF4\n3CH6vC+ZvcAY83sFytPQP7HnTTNU4GkXalAaIejImEHoEGcdkHh+U17+MGVS\nUbsUkneN+oEbZPJuc6cKYz4Dqt5QEzN0Y3ph2VxZDR2/hPAxJi3R+qVIppMP\n+8VhkupM0kK5rDkBds4UX3xKfe7ZGunF8g8bte+K8OezVUbUCnJpMbdOfVPR\nihCunp8sgYcUyayaanwNjBEdNv0hV0k1Nz41dUCPzCnZ3NqCqsjiQyONp2+Z\nrloojruu82bvYAmckhHSSFrQEmvcKdNKMrdT7xltCO8PJHAQjL7X6ZZnxYa9\nTHoVFU9BExSd2SwGpHzYC8Dt+foLOvGIDFqMJCHlTPRS2uJBvIgPECXyZS+A\nh+AP\r\n=zL97\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBakrmQt+pqOBUNnQuMmVTafWhtMBo4tULW7ZgZPsPXOAiAoi8kh8Dur5OCaAo1/XG4Pj9OKRqbKH14f+eZA4GAygg=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-3a5d61d4.0_1643319221294_0.2703273329565179"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"55.0.1-cca6e321.0":{"name":"ipfs-http-client","version":"55.0.1-cca6e321.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.9.1-cca6e321.0","ipfs-core-utils":"^0.13.1-cca6e321.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@55.0.1-cca6e321.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-l/tsjVcQTpsPoAyrTawuVga1DQjKUGFnS9Zzh7hqHgdNHkuGE92b1KQlb4boo6q7l/tR2/Jh5O+Q4Y8iKpGecg==","shasum":"8cc7c7e7df0bbc60d293d4ac478043da8262b753","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-55.0.1-cca6e321.0.tgz","fileCount":617,"unpackedSize":575207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8yTUCRA9TVsSAnZWagAAMNkP/3jFNYD+t9dmKHxZcbRK\nNm2D2aZtdcVk8y8JRCDgOYh0MRYbY5N6ryQyEln9aXVY1uFP8vKyjOyorFtv\nIfF0964tNlzWdB4YvhGNQA1LbfgKdd8spaGi1GUJ9MJwYhvn5LIfNBvZfz0+\neCsD7oL4+0tiY7KoQDEv/QtQs9wnnH+nL+S/z8fQpH5G5hYKgxuAA+ruZ7JF\nFYHNmuUfvjmhQqKDLqm0QvSFRiVgaDgVTGN6dgspcjmakvscu4YsB9FKQChR\nmE/L1OqfgMzxdO9PUM0LOWGLjjdaiR9WEItQJ6P1Tha4l4STMf3iGWDP5SO8\nGTNBPvnka+Vy/CBZ2b27KjhFIBiC5snlDpE/k7zQ4sacp9DmTSgMlVIANXf4\ngh/ryzaGrAHcA827mzPONShiKhcgHOmhQwF6FdiF9+PUWlb/y4Zlg19JZc4h\n+r+aOp4Vo8eXrmBxgcjxWMFHWhagt6B0cwrEEfOCHslyfLO2f73eqWnIbGTA\nHlKBDOoJOMl+Vb7EFBkxmId+RfOad7DWfLtuT/sFAWf39WTao8Msys6UYUez\naLXfYqU4fQXfv8MXEp3Eb+cwt7c9UB52B2/7SJTp2B0d0snMCWMtTn0FICxN\nxQeWfiRYVtWLM6SIA++0PnAzrIbTo0PvAmqELkr7fSwJ5STzmD/a8mOfikfo\nyUxK\r\n=XvOR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEQyQXdCxPApz/uLMJZJrzbodVLxyflLVEAvsfuPegKqAiA66fKAAcKdItB4CZC1ouUKF3x4KHxkHbAAeInHE4uQiw=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_55.0.1-cca6e321.0_1643324628195_0.8603325274776523"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.0":{"name":"ipfs-http-client","version":"56.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.0","ipfs-core-utils":"^0.14.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"_id":"ipfs-http-client@56.0.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-JF3on9c0hB9XHk/UCxbyC6rSpERuj8F/0QcN/HImZoHNUKZ0/T8DpgVopocKdmGi1gr3Izlop7poaXomSt8Nug==","shasum":"f42fa2bbf987bfa128ce0025de5d668586f4a815","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.0.tgz","fileCount":617,"unpackedSize":575175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8yghCRA9TVsSAnZWagAA8i4P/jZUumj64Xy0IryahnU/\nTmIjLT2PR9J35OGG4+7zmglQj6R3O5imVBYFNYDDyjlpYqEoZikhSOgfsktb\ntQSOyWufSFLCQbZ177gKCgfvG6+kfk0lhWrY3wEHEL/BuMYza4M+pUdECmVP\nFYEYbYPmyAn0UVn/piwqw6QtddrwfECCCNuzb39v2XkptfIIBPmZQMLrv3RE\nbX97tPoMEyJk0TJHqzLill8aZszOu1qyxkk1SDRIhakbLxSYtDu5VG6IRKlq\nvFxLyDPBtpOTl/GbDb9PjszlxQuNa+iKYSXn03ko6qYUaeiKk3W6gasBCwV1\naP+PJNDOEr+fMfRW2PmsmlWsRWC2V0CuzcPSThS31jYH3nL3EhhvYi9CTpPR\nQQC3OzRR+tVUmALzzbZ0RktsaL9b0KIG6MdgAVtci/i6peVgXxaI3HTvrdks\nx+mU3WBIMQ9QLfoF965yp3Yb3hgli4a0h6L0vfgezsa520zQDu1c00j8xV/H\nwHn7LqUB07ZRag7JjpLMcvaOcH86P9nsopEInFzsHsHQ/JzhZnh3yqFCUsLy\nPSPHDbOAAJ3FjrTEdf/Fo2kldvz4OHJ49YZrCqpOIzTOysYc45ztn+F0uz/3\nmbAMrjqUU4b8ojrmpwtZAO3FtzTRJfdptJKGQBbaSlaQcXWwjeQlLtBDyWbL\n4lQZ\r\n=zDJ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSNO9HYHdH6hLJrScfPqsb7kcLVctHRKWvpBLb6UytAQIgXL6Xn/cVeV18rRviHODDvY/eINNCSONOT70Bnkj0UOA="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.0_1643325473773_0.07444758377472693"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-8d260215.0":{"name":"ipfs-http-client","version":"56.0.1-8d260215.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-8d260215.0","ipfs-core-utils":"^0.14.1-8d260215.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-8d260215.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-lkWcKQWjp2X2hxPYXE88rymhH16Ay8TLvb8mn3Nc6ZP7dlTdwAxDnnF/IS8oZV3IbbwR4drreKPP7iZF2jj78w==","shasum":"a4e0010948b126657db90c66f603ecc45649e0b0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-8d260215.0.tgz","fileCount":617,"unpackedSize":575208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8zBcCRA9TVsSAnZWagAAhS4P+wbSRmjDEzK+6+Czp44m\nyjgTB+1YKKBLZzjtm9Qp3TysfB5UQhAJOlJXKcany8LoOMVcp3pKdmyB7YMH\nbe6wuNm3Uv3HYI5egJwmLChh6tzc8teqkyBV6BgZ8H9/tOg38FLmulOxNCoL\ni1gqEx30/LqebBtavZZJ0cH6EXEUPOh3XYwXAoAMFkyDD1eWkw6TfV4BJuA5\nK1zyp+5b8uOyVShAphspW28u8mQwwGOIO9Yh1yy5jZ39EMaNSpEWL3FHQ7L3\nFfts0p7HCoR6nzRFXThL9sszPZviD9Do3kMb7YXvW5wY59tOZdOUfDySOVu2\ncCCM6en0omzEXoa0ob6pkf4dotfLBhpHlfuZFile2xqyEyvTAVntUvfGoZrP\ncWifN9x8fT9qKHjhwjrI2OiuTyNuRhSNfcpNGIwhXfUFkIrRuw3hV1PeaBk2\nvzohq6EbCQiXDUuebe+azsF9N7LMD4OoTzGxE4ZDcugMElk27MooHq/ksI2J\nn1c1zTuMNys9uWOyumI1RJyZy2rPOkuamRs5gWkl2iq1yRcjcWQPK3wlQywb\nQ+asGkJzEElj2NKcOOwaQXoDk4giz+0niReVg8pTXLauCL3cs+V7oynIO2w0\nLN1KVbs+a554o274rGY5V7N35xEb+SErprIaBaxEOpy85iLeeMRL8/Lh8RJO\nz6in\r\n=BIPE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHhSI144XaphJRT6mMyiWHG1bc1B3d8LF9AsjszfDO4AIgRcR2YKXZ4ojzKUKTB18zMWIPsPU0rbYLCLuAJnsB2tQ="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-8d260215.0_1643327580691_0.8939447371794695"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-2c8ec080.0":{"name":"ipfs-http-client","version":"56.0.1-2c8ec080.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-2c8ec080.0","ipfs-core-utils":"^0.14.1-2c8ec080.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.4.13","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-2c8ec080.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-/zJOtU/yZaDAhXXwtdqlRkbvlbbMWMx1p32aFzsGLQBOAt7goeKUWrsq29oMfGlnaROq7DVsmkM95wSanxZBwA==","shasum":"7325847fbcf45bbe9b1b4907fe2f7fe4510b33a0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-2c8ec080.0.tgz","fileCount":617,"unpackedSize":575208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9AQZCRA9TVsSAnZWagAAkQ8P/01kbqjuowPWSEM2Ob1d\nz6qFbV53DHSG5/ljjAxKBiZT94998fv1c74psyruDb0lgqDYhKehlyBOYHhI\n6N38y9UJVMSTPDTIcbnuHU3cXdYiiOnkHl1h/bCfmrltKHjcW66TXHL3mH3X\n1M7GFL3De5b6hjw5m6g6c8lax3Xw4ThGUmJe9J9r7CVMvTkkrfYtD34mjGbF\nH+ZfYGY8WZQOKaKc4wjuVJFmPu3QFqS8LRhXYDEAPPRA7geHceXJgSgCL3q8\nsmRYl9Ul4X3vO4dXCujs+LJn4dmVlxLPFjScRjzO1D0EMztquBjfO03iAwP7\nYc1YBBOCKqZIbKcbviatCwfXCeMxEuYOtfrPMkl7Gc0jOQW9bSkoLNK4wIOL\nbZ/8ql1ylNrsuUbp5CjpBnVUrBE0BiLOfpLOO+7k916ZifCQwYPo2m11ar2W\nMpOuvJ5RdIFtCh8yg5lzVXf5ytOXbsbLxnWUyKlIyZuvUFv/n5KPnAmfERdi\n3G7QLz1Mw1OhDPDFt5kucUADbUVQuGVjiPHLPyP6JlzFmlV+32oCs0yxSnrT\nwf5xDZlhmxjcVpq4hXilQxcg21T7cPvjmgGDq2SF3KPhjJEsXTaAj3FcLtxK\niTDqbEB1fsANM2uV+MctkWOE6X2SkWbcpEXUDYqv+S+YGwcBNh6fmonRVWsp\nEl1b\r\n=uYbE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDIT+aUQkknvOYUL1XPUB+PRknfVGaierb0yTs5JFxKwIhAIyqXJeIyYMs7gysZ7D+sd+gz1tywu3sLSPTWw4I9RLp"}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-2c8ec080.0_1643381785582_0.014150281570789902"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-3a74c110.0":{"name":"ipfs-http-client","version":"56.0.1-3a74c110.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-3a74c110.0","ipfs-core-utils":"^0.14.1-3a74c110.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-3a74c110.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-DtotoiBFsFh/llIlkEFZmjmH35fzgSOIzjAc68+oF+nhQq+8CAct4VwlbEJvNAt1a1CzpofvIFAhVQcKAUr48Q==","shasum":"6d4a23a7fef384f46e4d7c6351436511e5ea42d0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-3a74c110.0.tgz","fileCount":617,"unpackedSize":575207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/VGDCRA9TVsSAnZWagAA2JUP/AxSjS1q2GYuqybd6s/O\ngv9SFAnSl7UTHK5rcNGFeJdAL7jWrvZOU5ERT+jF75CcIcjLPFJSzPfdwBgF\nAHM6ClH/hyGlLkZjbljHSz5sQwD8vzs0psfF5+hRIJwrDEhZtwMTfPjrye4N\n+e079KCnOP8bM6vzzRATCTpPTWHgJd2UC+btMjZCNfjRpSx6lY7EyfcmNQPa\nBS3bkNs8XyikLpEVZg9g0Vc/+/O0E0M88EwDfXbkIOJagDq7fVGovKss1bRq\n9NNu56xMPgTCyf55e4lWcz4N4z7oC+U7kG4SSXCX5r4bqtSJ3ByGqqzC+SdC\nxJmQBtFaDYEsj5F0G6jQPYUmosdGQjA33yhL86TQHMB39tcwJp/LdEALykCu\nF7fp69BNPpeH3ozNoD2OFz5ezCgrwv/IvgndDzidbPIVeAFKALhDYKsLvPFm\nQQWnaUv1MG/dnhG/q7zeLViml+sEKx7lyn/5okvqf9AET0+3DZj2QHA8aAVZ\nnjq/vWlxUpzbbAS89KzFBvxgPsqLEoS6NVkTpeTPUQ0Co43gaG5g6M6dyAr5\n/EXt3L+Il9gQMmn0BaENmBz6Nc8yIsAjnvtHcPFLub7LyO4UauFehgl/Ita9\nhAzRiiohzjnpFfubdEI+RZZ+oc+pNBdPEhvHKt3ToXUl6ioklBOvP/s0pMjD\n5iC3\r\n=A+Rx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzNjyFu70CcJzLX3RMiEPRBBu4cbh8+7Km/GD3nw4X+AiEAjNwNArWYOZyoiP53luVF5gwDO3Tss0IpaPAGEFxW8xg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-3a74c110.0_1643991427626_0.52140690805953"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-383dc07d.0":{"name":"ipfs-http-client","version":"56.0.1-383dc07d.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-383dc07d.0","ipfs-core-utils":"^0.14.1-383dc07d.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-383dc07d.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-SnJ/2pdmeacXM6l5K6RN/1QHqUX/mUCT1BXZM0GPNun2/3nEWTBw6Nd9NUFth7zWEJSJ713xYqb+cV7S8FOwzQ==","shasum":"ccbe8ce1758c9315b9e391e0e8568a7bb3bf91ce","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-383dc07d.0.tgz","fileCount":617,"unpackedSize":575207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/YUZCRA9TVsSAnZWagAAuvAP/0DCSRdfDFKTdXhbRF9N\nhReo2HqXN/p8GQQ7Dpd/QNrumsPBxFfMhIYKTLPDKvC0qXbvdfOBb6yVnyUZ\nxYFp/oYMVApXoL3lvs8/wY/js5T3J9GDuF/ceUG3oSjjA0//hql9UnK13uu0\nGbnmm9cHRwq3BcmOPRXi4IbT7av0jvUg0fwY9CuTA5BCkYteD+7OTODrwcFg\nIsijWQ2j6fJR9muospDm49yugBRLTRTK97nvSpRsp84lzyOjAN+WI3nuZ8cc\n4rG26/iz65HIuQd9et1V15ZpvnCcwsDlQcsRz3qgjZRrEBo7jCHjmHoivKxo\nD355HAmhITsE4Afqi3CA6cp5xEc9XHYn6oT62HrYDh3Fgia4T46muozvN4KV\nmzm7JByr++AE/6sB+KvZLXT7Jy10UAyU+joW1GdbT0o5aI3gPNUEBrP715wy\nHmWoQl9F1Wc+dH8cQVnFwlF1uVB9xZx2IobCkSUEomJVlNRoaA11IF6uVK3T\njueX/76nw/8D+XFn+KS7zszilSfEfFbpasepiBcf6yia1PyYZeWwJSYSgybt\nX3l4h2DTddaGHyVpiYF446iO0KtAVRb/sFq2SApTKE/5uPVO37Lq3MO22h8s\nIH5MnaU8QNAVTB/gDcofOc4jABjfYFAhBg9OUb9gmt0iTQWPkNg4PU4OPNxo\n0XND\r\n=uZcq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPcELK0FoJ+b+bfZBQYxx63skK+FlEQfX1XILiCDjW1wIgSbRhz647zVD8N6f5DVH4NHkBdBZjzuNfcqUj7896V3Y="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-383dc07d.0_1644004633454_0.7357439787087185"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1-709831f6.0":{"name":"ipfs-http-client","version":"56.0.1-709831f6.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1-709831f6.0","ipfs-core-utils":"^0.14.1-709831f6.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.1-709831f6.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-3oEjouP6oK1SzasVOcnojIsh5D6zv+Xnc5M7nnMOI/ubpHhwSdneEhWbgQPygiYwPPnXUVGYmIyOy07k9prjNw==","shasum":"21e278e4bb080ff42fca6eb4711c6ac4c80bcf28","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1-709831f6.0.tgz","fileCount":617,"unpackedSize":575207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh//FOCRA9TVsSAnZWagAAwg4P/RFEf4DPFMWsmTteUdhs\nzjDBsxuJVdustb7/iIPLEnzrn6aZMEEYCnJbaEbF2CLwV5qCXcsY5lDZbX6N\nuf9srBUnNkaaQKKtJHxAIDt00e3vOF7PZtECN0Eb1uUAGL51zA3tN+oypWMt\ne1djOk8C0/sPiQqzw3suj5K6q9ZQEVgSokz1M/JL4noTuX+Lc0pWoiOOlz1O\nIee44jEuwLpVK4f7iVr8zsYmkWlEsOI2rp1cUHEbSAmEZBu4I00drpsdPDqv\n7jmgP1V133F/Iy8rfn7UIr5GqkQ5rSOaFW7xhh+DZFN/vYMYw159iRw+wxxw\nlopfPU3GLOWj+hqAm74yaoDyKKEs2btISHdHlntlsCAqGtBmHhsSksaNKvMt\nnhNAwxN7SCpHgKyzDotmS2SpyUCKIqxPuwH8BXsOaQZsLDFwA03FAXj8FWTq\nuAkpHK5lD7BgSyQ9fFlwHgxzi4HTtzU+ZO9j7hMNxIYRQEQdwBU0eVnRVQ7+\nK5WLhcpqgSCFORdJaL49P+q5bAXKSRr7pGV5avwJeVHSYDbBtrxeecTWBXj8\nfWLTc4AOfsdLyCjdtm4HTVhrotJ0nRZCTDWoBjtBD+TE0xmf7JxB1PsZLQDs\nlB3yJZzyuy0hEDydx0qh1YEdZrHrpHfRWYNw4GhxZijaAwd7lw6V3Or78kec\n75Xd\r\n=q31W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqFWVGS+c5Po7IMXXVxbU7+dbN+4N0Bdp0jX7sK+OxXgIgZ5vGGtInYHKVfsdhsAC8WN2UUhnuEmxmAdUfntN1MB8="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1-709831f6.0_1644163406631_0.6113487837723057"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.1":{"name":"ipfs-http-client","version":"56.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.1","ipfs-core-utils":"^0.14.1","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"_id":"ipfs-http-client@56.0.1","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-U0sUyGZndcIluMJL3gDdCSgF7RwShDklJJxfDf9IRcbO72hqSJsib4amYzqcqfetft6vYa8uRIoJFEIWndHwrg==","shasum":"aaa40a1bf3e3d07f5a49fadefd8b6017b91e3fb9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.1.tgz","fileCount":618,"unpackedSize":581402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAU4UCRA9TVsSAnZWagAAYwIP+wYDvEYFHqmMTr1hbQZM\nyC0j7WAf0A7KpB/sSOKSbESzyEGICHnYrla/BEOnLc64m5MQvLRASI2jXQOY\nFo42v0768fvo662Wgmqd9c6AV1SS1rayt7AK8VEoTsymukGvEt9fPsyRII88\nkgNtBW6IYu868OnBBsuK5SeWRHQqIrUo57fwZONXSFEosMBrxy1Eallh5gsd\njwK04mROibvzZeofFBwasiZRIv45uLCwy2KRqc+lnT7QhWs2SQR++/D3ivEt\nhgdLk/5PQ0joMVvMmE5DCweOG8g6+JJI8skPL0t6+uS67idxLTZCJRxSD8JN\n0kHPDjzif5pIFC8S8dWk5aqgjlQ5+W1Sg1GhiGT5k1WVHs6iGy3Y7av8a5Oj\n5wdV02tFy9ssubIFRjsAkJ8t4f7rO7ZTq7AwNzMq7h7pNZ4t+2TVhnyM9MDU\n3hrowo4PqMvKu64l4Wy1W38Xnn3yrmHiqn6mrbCOGYf9bLZZKEX7fb4xwMSG\nEmBdizoaC5Z3QeQGsHW1Grx2IpbKEeWiMizONT+NcpUiSDbZXCeocfRpi8Rc\nBofKVVBK2QXmrbChaw8Hs9Od4c+yLz+A9/M8KPHWxfd9xyNGgTd8OptAICu0\n13iDLc35mJm3voJFISXLcICRUNJo5CTZ6LMk7rOLmmNhrSLzLWzwh4zz1+5D\nQv7r\r\n=BgJz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERxycX1QQnmLG/5Tecr5DeCzSQcMR+fdD0WaDA6myl3AiEAjEPK1mdN1wkr0L/IYTBCPwAtyjhGWOgCI5JD/ml7lcg="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.1_1644252691931_0.1898368165191806"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.2-1082fce9.0":{"name":"ipfs-http-client","version":"56.0.2-1082fce9.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.2-1082fce9.0","ipfs-core-utils":"^0.14.2-1082fce9.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.2-1082fce9.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-kQirIBZ3kVVZW7KdHBszPIUXxMtbfuSy3Nz7IJE6Tv9uYO8gJ+FgrtHgTWJcOshDPsSnAyciJXpdYZ24HQvRcg==","shasum":"c6261870237d0645b4b3bdb63895da8f8a178ef0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.2-1082fce9.0.tgz","fileCount":617,"unpackedSize":575207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD8YEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrC2A//V7cIDE506I+9yDbPVZlbbor5gCjY/YGgjJqOPQzbJ4o+oybg\r\nUOwhAZP8u4QNMaa47SyImU606szbq/lyHF+pCAFRInUPykFksn5mnHaLQy50\r\nqw7eQkGVmzn4oOdisPK6gSn1WVNlIDqeMVcZQag9H10tRP+0a8hNFNkwTA1M\r\n+IgwRN6qfgihJUCsJO3UuYT489XQl1yRuR1Hr9MAx0mDqVYqd5/+olzDlGzs\r\nTuRQ/BOKzi2m3eI4FBWwlnNkmjmQ3v8UPSkH4p42aIwSX90oqkf+Uii31Cdl\r\nxqbS/LKeLe4l4x3auCgskJQQJZCJR8iQ9Pnt+1D7lKXkFXKmLnzgikMpltNZ\r\n+uefWD96azcfEPmoAmUzdRbZTlKuFFpKllFoVHD4eGS33bB7lUN3AY02dfzN\r\nAmIObUg0Ec/aAlyTJuQe+fADVXGa+nucGH+wI9Z7CdmZ0njsK2LL1En8Sb/P\r\nzAABhu8w9NMzm5j7OcPyvhZT3Py+bjpGBFfStCsfjJ8ZBQMSjB+VLuqVjaeV\r\nBqpkOv/KYOQYr3HD5LE0GTOqpPhfWUvF891x+o8AwnWR2NNw6tBS2aPBn0RY\r\nwWLBNlWPaP2PwOCeWZovbV13vnzKNUmV6oGPo8PPYroTsWO3488eNpQKxnoV\r\nxcFDBzpgPaMrJECndEcTphhcwOuLJMZwDv8=\r\n=KkwI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5DH/Dr7GH+6hEGsd3BiYXMAxBXgT85FOpcSjZFf35BAiB5Huj0SluEffi/Hd1Q9z2Z7Qu9n3oG43PA8Zcq5w2VvA=="}]},"_npmUser":{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.2-1082fce9.0_1645200900107_0.4316457844220627"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.2-125d42ba.0":{"name":"ipfs-http-client","version":"56.0.2-125d42ba.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.2-125d42ba.0","ipfs-core-utils":"^0.14.2-125d42ba.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.2-125d42ba.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-t65rCQ9X/3+yF4ONzZZrSv1nb8yebzrH82E3iMagIpGPWTHJz4tuJxqmp0yH4B1KKvTDnNw0xLIIHqXQ9eoxHA==","shasum":"dfd13b882be5ed62feb74ccb1ba61f83d96c91b7","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.2-125d42ba.0.tgz","fileCount":617,"unpackedSize":575396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHeuRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrL4RAAmRkHlVOM2cYA7ShlAobDuUt1KjUXzCj3FJzZUpt3xX4ymxIB\r\nEtMX2lM/5LN1DeSfSMD0PTQH7e1OmLWllBAvKeh553viLI3jTYcyszGEzwsG\r\nCe0+sbEdlFGgxcFWQfiRrxwAyCtZx79jzsqspVxmfB2zRvdpduxKJEsT6KPv\r\nD1tdD+4b+r+0F6SzzZH4vDwMCmiW9VwsO6foLWO0R1C25v72pfqRO0nF2BRy\r\nEq99SLb97xXuwAoEweG5ct0fSxNPDWRyXMKrZ7EIjmAc8B4AM1yNAk/Udvbb\r\ndSjqhTJQ3NJVwyCebaCzanRAGXSGzh1dQHnlZKis1OFlxiLuj169we2jDNj/\r\nFtJP7W486nLxbD6T14dlziBA1xCKTEo/jOBUcCaaWBzjdMRPIMya6f3Y3ru2\r\nTOxYQF8dBQ1+8BLePDv9MWdqGcrP4x1HN9KvQookhpPwGqapFViUUXj77Gil\r\nbtsA4vJh1BoTuXKOYIHgqz/jtzXt2MizS89y32Ci2ji76RZEk7+9l3VlwTtQ\r\neO2ogjrroLCHd9a7luL2cUYoWSh7DclQxfWJ4EefAD1Os2PJYYD5625FQTq8\r\nE6+o2D4D07jubqkVilMItZHuqHloNP47eDU9mA+Jh+89N2aZIhWZnUPOpMuh\r\nO68KiGJbIYXC3uAGiFAtaG3Yv0oM3rtkpC0=\r\n=oYdF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFuu2cnWn01m7I17MuCaRWI9GUEzDwlJ+BNQlDmYETuGAiB6XIC/UfkEs09ekrttk0PHrofjKaK93sTHu1TcMcVZMA=="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.2-125d42ba.0_1646128017737_0.22849859302048858"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.2-df1bd1bb.0":{"name":"ipfs-http-client","version":"56.0.2-df1bd1bb.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.2-df1bd1bb.0","ipfs-core-utils":"^0.14.2-df1bd1bb.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.11.0","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.2-df1bd1bb.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (linux)","dist":{"integrity":"sha512-/NdOynSZsoxbj7t2yE+KuCpfOMNA3F3/JrQpLHOOjCsnWrtx6+np8so3LG1kcYHL3LefPeKFBtoCZO2uoQY64w==","shasum":"4a0af34021d3eaa617bc2a7572d8b560c507092c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.2-df1bd1bb.0.tgz","fileCount":617,"unpackedSize":575396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHf9RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrB/Q/8DPpDKCmQD1/3cV/fSYtdqIngQPUN2MoM4iJr8txjCokMZjjo\r\n7fW+AzfixSVH0gSiT1j3nOEHpy9E2SRVKuGzUSGBXEyDcj8m+CztbKU/zNhp\r\nX16L+KWKNcJbo1dXE+CNBqQ3IhFEgc/g7mZTrWwsCAzefkrw1IKqQjTGEa7s\r\nAcw1dkOLq00A2w6IvcGXxGonOB2PAWcQYV/EAQ+Lkl9jOGur2VWIWpMUT7LJ\r\nhnBrX9B+acYUK2sfK5tpaw8/OqGef2KDP3dvUJSEyIxaiwtlDqf48GxrVKJZ\r\nFF1h/+yeexZKZSs9Y4l9Nlif4TG/mzm46v+xxr7zk7gJT4ebdu72SZBA0FV/\r\nCB7LzQoBKIOTHc1upskoFK+7bCSRF7LEzteNjuDQYrgl9Jb9d6DIVuSlv3cw\r\nHt14qlNNWNcKe+SLLNZERVuPio2gDPmRKwT3gVF9TI++jEFv/d6Z1L+pvD4Q\r\n3xeIKVSWCmB1WNkDPg+qRfj+jVtKeTIUnK/Bfn3Xf6GfcdxYP5xDU8vVpqQq\r\nKG7SzC74c3zj+RT0pMQ8GO88NGa+e3ticMXZBwvwSCNBSvSMQdDty2Clf8hA\r\nv7WUeV9hjCmqu+y13HNDlRM6d1JN/B5LGgZiCAsVKg7pVEm5lpEy9MwF4+22\r\n0AZpv7c7isSBqRx98iYM1ZcHa//5m+5OLgg=\r\n=CqrW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsUR76hiodYGq/HrBTggSNKUcCYsMZD7aE3y6WcSsoNAiEAy1e/BKpnRwh2rf4QZOUpKibOm0b/UAMlif8GUnWXEwo="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.2-df1bd1bb.0_1646133073660_0.7379849385074946"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.2":{"name":"ipfs-http-client","version":"56.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.2","ipfs-core-utils":"^0.14.2","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.12.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"_id":"ipfs-http-client@56.0.2","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-IeIJJo6CDNCnTFz2hTSzzBDX34/jJmlyxk65NJAS+kgvel9aPRYaSestymDJWvOZj4/bBtiJ8X2CsRQoaVyIBg==","shasum":"36b98c69545ae69030212a9f02c2dcd39afcb929","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.2.tgz","fileCount":617,"unpackedSize":575582,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtGRj+zmEmGMXSxw1T9XOAO7Y46/q0HBapA7J0XdC4SAIgNCj4gEuJ1MmXZBTxbZzpTPjEZQ9vma5dBuAy+mvRAr4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTFvXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIhg/+LhgafhxRnAD6nmwjWjmc2lN/q/Cd+MIs/WB0+Y9WpKQ1v5Xd\r\nXomGONgQL4p2YX/6MZk2P3Wx3c1qjGQAz/CSKvnryVzrzhMy13mXS9cao4cz\r\n6kBhzpvbh9LJ3wX6xqbAzLBUmam6m6ovQSvz85OBiHlDa1ahJWseUaXMnBGM\r\nOz4QuCdpXX8lSeg9UVttLm8Sw8skFAhYTUmM6wWAelCiEJWbFXiKA1R5XF4T\r\n2QA8I4Cudb6UhUmMPObhzc23D0KFGbEEr7DaYoTlLtLF1CyhHKxuSRJjonAo\r\nB9xuOJfIFJrsSKCP1f+ZMqaG5KzNRBEa4CXW4SDZBjjHU9aQHLfeXA0XQoEX\r\n3Q5EDh9PdyuJ+Iv+39ZagNLh0s8NZGZXuEqh+4zhwa6WFf3M+pAmno/M9Zwg\r\nmjSnIojBmY9msrdwJHLrjhbakHWUjlhuMZMlQ0+xSbT8OJgyP3Za9ctqdSn9\r\naqoauggPjJOahlCNFCg4LmA9862ouigEeqwqwN5FySTtGwbd2c3K3YNk6u5q\r\nwYDNHefDnSK3/RHDp63r8C9xDQ3DlcxhQxf8BpkiVOYvKunk1LCyGGvh0yTL\r\n/KhcPM+TL/DBay4LEn2FPjAR2LfuB0qiIvWnpb1vxHSMu8NLAUMhrDTj39Yf\r\nljZRYabKEb0zip0PaPitk2ihE3VA8sa2Gbc=\r\n=vLvZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.2_1649171415636_0.038852235977911986"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.3-e90b8f13.0":{"name":"ipfs-http-client","version":"56.0.3-e90b8f13.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.3-e90b8f13.0","ipfs-core-utils":"^0.14.3-e90b8f13.0","ipfs-utils":"^9.0.2","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.12.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.3-e90b8f13.0","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-AGdggu/N1fh1JrIfYknrI47ArSbmiGKC1avSMzkfKQIVadufwCusEDAHw9L9nB6JyKA4RCFmZzkNAuY8bR8bQg==","shasum":"121944e7e387ff425f8f4002b43f386fc5906648","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.3-e90b8f13.0.tgz","fileCount":617,"unpackedSize":575615,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbV+IZKHUq11MjihYhW9azLxvQVtm5pIh0g0x2unCgFwIgGQFM3+QxeFRZ5NcdRnIYrwFI2ZflG9oY9X3YVsmLl4c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTGndACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0LhAAjIQxgJp0x2SPjsbpiNiHZAwpRFyEjUq/9urwo+KFTFOOs+S4\r\nTZKzDTpQ79lNzUXnYq/xJGoeou7VPBPj90UkbHShK97wDS/OQRi2Ew6YDNo9\r\njIFqDwHCo1jyvakM1i9X1rSr6p4MVOePV4gnW7StYZHZ/FKYoghj/6y5M94p\r\n0h9Mav+1cNo0FztG/AqdNZeJD+a5SznnMF7h9A3vJW4pxiDoVEXohW486S8q\r\nopgq1hHDIFm5fSvIVIZYhrfRaw4syYsu/p6KCJOw3mwkFgBqbwC7qUNOGmGy\r\nQ0kvGABpz1WJrMUtu2KeIFsTEIYieA5CSWa3T1DEZICm4ASSJZe7BpQXCN1L\r\nXCkstx2rp4tXOYQjIWzEMA6g3yJBDVC8mvXeMG7cVUb/vbIzrFIXi51TMuHH\r\nwha6fGHxygnx0d6isU28gT6oxNVLwdAWunMR6IBwxIZqZ3oTIIyYtCw7W2/T\r\n3JSsNOM5gzRfypILz1/4ShwBTg4amfHLEUIGu0gGZXKliysVjbJYPkyTEbZ2\r\nTE+RHLvY5ueQT/tk1E7EhH3ZrHibWW2UtC1xxJV+wlvF0LVyPIXmQ5mIztcF\r\nEdYxvnpfSbK1Mey+D2NkCxoqLBLrevUV7f0dV/FkkR5sawjUUzhxjtxmaVVZ\r\n/78cuLSs3ss3916ZQj6adqkrgwSHkGte3zQ=\r\n=ncXK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.3-e90b8f13.0_1649175005696_0.7995953672671983"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.3-8f7ce23c.0":{"name":"ipfs-http-client","version":"56.0.3-8f7ce23c.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.3-8f7ce23c.0","ipfs-core-utils":"^0.14.3-8f7ce23c.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.12.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.3-8f7ce23c.0","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-BPw5C4b62dCf/XX9A2ZARCqIxq/sNNtX6tGQkIKmHmpmVE9ifDx4xvukafF3WMgkE3iqf8P1kh/WaSD48O4+/Q==","shasum":"e40ec1fc379de1533ffa8ea45368de63f0656515","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.3-8f7ce23c.0.tgz","fileCount":617,"unpackedSize":575615,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6eQUSXAV6NlzDitn4g2qZArDXHtLSEqqyAMOpDWPaMwIgaYyTsCVeBWkkvGJn6xdf7DI1U9VJyk7ukMRdewKei8E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiX/8vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpesRAApJC3GGphmfOm40TNw3gD2j53fS6x7VbboHWTZpaZ6wvEz9AR\r\nFcY8LuawFUXq3+r4qhOzM2dUxhBKYYwd2+b1XQyg6wBpoH0mFv6PlXMHH3Ms\r\n58ZWCje4ZBGRjJZhK3enntvgO5m2sNCpWGQECFk14w/MwN9EayPCPGzZ8hIY\r\nnNuQ3uhTP7sdHf+aBHb0fEMX3YxaGuXKxUP9zTmTKK4Boe4fWuUlZd060bjE\r\nP8dUoJuaiKuV+lkDPb63tRh4w6GtgT/xZaG6+eE+7+DI1g89YOk11A2ApTf+\r\n+aeibwLOsuFlD1pzI5mSu57YL93HtG28DiQio6rXq0Ug2REjcxKWm8XHvP8Z\r\nXpJyNEXZrg9D68sLD9MSDFncCh+DruULlJCGx6SRboN2ThzCjnH8VKS/ddyM\r\nO9an/w9DXAUfNUlnjdT4oxI3yyLYi1YSP6jUSmFJ0WLEK/8BsHBRsZdWpdQY\r\nsJPz7ZMEqKgqQLd20V3bzlTDMUoUrv6nN64T5byP6vkjPUdneGjIkEO30wmm\r\nM1ATJVdu8EYykkQgc069fWfEZzHTXLReEhMjE1UPPkhFFSLsBH1Yqsg96W7O\r\nYQuLQ+WqpcLnhnpHKCpYue9avf1Ni0+At3ueLPFLdacQh3UpwfKA2HcpeVOe\r\nag6OTc9hEbW0yTXw3zD3VA6nYN6tk4kg02M=\r\n=0+DJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.3-8f7ce23c.0_1650458415179_0.16113849407375813"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.3":{"name":"ipfs-http-client","version":"56.0.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"publishConfig":{"directory":"dist"},"browser":{".":"./cjs/src/index.js"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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","test:electron-renderer":"aegir build --esm-tests && aegir test -t electron-renderer -f ./dist/cjs/browser-test/*.spec.js","lint":"aegir ts -p check && aegir lint","clean":"rimraf ./dist","dep-check":"aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","any-signal":"^3.0.0","dag-jose":"^1.0.0","debug":"^4.1.1","err-code":"^3.0.1","ipfs-core-types":"^0.10.3","ipfs-core-utils":"^0.14.3","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^36.0.1","delay":"^5.0.0","go-ipfs":"0.12.1","ipfsd-ctl":"^10.0.4","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^3.0.0","rimraf":"^3.0.2"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"_id":"ipfs-http-client@56.0.3","_nodeVersion":"16.14.2","_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (linux)","dist":{"integrity":"sha512-E3L5ylVl6BjyRUsNehvfuRBYp1hj8vQ8in4zskVPMNzXs6JiCFUbif5a6BtcAlSK4xPQyJCeLNNAWLUeFQTLNA==","shasum":"45bbea55347ef13524769d5919cbed84d9d022d6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.3.tgz","fileCount":617,"unpackedSize":575582,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEfRpo/zpY8Zgs25gx9R9pNFDMIEBQwCKXl/KWI0RvfmAiEAyPmJNBrV6gLb0f5qwqi6++mcbJERjVi/2AiVPwa4mPo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZ5jvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJGxAAn2PveC9Zep07bvUsAy/Mexm7TtCni1NaYbPCsqbZ6FPiHl3g\r\nzEH99qEgRLdMY9LeyNXXJJEDPpUIzgO1U5NdE9n85VU5fK+iivAwdYFoES6x\r\nMQv8OewqypXAGlSzSEn5mx8uOD9rM2OfZfCnoHvo9rJLC9ACQocqca8Zqtyt\r\n4HwEsEaD7W3ntsYInGCu8bYuEFpjO0Aq5U/JCKLGpV7PfYfqWjTUta0a3brB\r\nnewNavwse2iqxckh4Z4Odfi+3Fz0DNI0OGRfPiesKPqjqVbD9Zu8kAEq59tj\r\n4jKSvUHS9suMfpNFuoIG31Xqr9v/oo+7eS6GDc2QdIY5nGe+FpUFDnrqpGbH\r\nYjBpvx/5YT4Dbu6C/jMkIjZEWqDEdeBogSql63qDq5OEhDSDLj+m0JiSWQ72\r\nNA35VCdQADntLz87DFttocN2luGIr9tsGkdvzD8KBLh7bqVzDZy9b4fx52we\r\n3ydOoPFhE+g2Snrbu7LqfxLK8fyNWtwuKRekjSt9oVuVMZ2NzLRLY9gpRwH1\r\nV9rlkrZPnuwvR6vBAyStF/Yhd29NMeWo+AMehnFxf4PJvMcBo4wfGMWsAPlm\r\nwM/xVoxweijnDSiNlrm+Ta/XgONMnFWVRUbML+ExFP2+XmaBZOPopG7UWa7J\r\ny4/s8L/+PlL2v9aSg/prDAhJsgnZLiE7sZ4=\r\n=rSUb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.3_1650956527101_0.4578202863639309"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.4-7165bf71.0":{"name":"ipfs-http-client","version":"56.0.4-7165bf71.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.10.4-7165bf71.0","ipfs-core-utils":"^0.14.4-7165bf71.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"0ef2fedb9b9cbed1b4855c48b5f03d343ceb573b","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.4-7165bf71.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-73CfNl680oae5iNr5DVBrEI5Ij8G2LyVl38GXLINaFflUVK6bH7Q+6G5USDU/KhTcbc/eDlXAmeQDoZ7SpecvQ==","shasum":"ecde63422bbc88492af0727de3a617716954bee0","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.4-7165bf71.0.tgz","fileCount":463,"unpackedSize":491625,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA21UUy3gCdH4UoWAmVg+dEAlFPHYf4dLPllfhxpxyouAiBGDeuLp5mHyZ4pLYjwPr7X5FX/7iNpCDBALkuCsSp8BA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigq8bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0Ng/9FlWMGlExXFch9BNHYD7fEBQwGXjhldzlXoiaP8hJWo6Pj7Nd\r\n86NvUv6xuLq6Yr+r0Ha7FiMzqFB9//NLtsFnDuGsS/zbdFetOmJZYX1gtBVo\r\nt5BOMt18y75qDCgqQEZUatJaZgz7WfvWOKEwxKM47ByrcEA+rBjL/y3YrNkz\r\n8r3w1XfUlcRtUliCQnr/I1WyPHXsNnf22dGbKR5XUE4dxK+Y93HDSgJbGLOi\r\nvmFdctZtjQtub3NDL5eDciL4W4UXVxVYg/qpTJj8Zh3CKuiLBJ4CWznVdWGe\r\nT3d11/jPtS2Qfl5N8zGzqmU/qFoG+1NYnyxVQZFzs6LcYAhOQQqTYbJOwuXR\r\n+VPSZs5n14qa72H++Cb/BD+AnBDPH4e0/fnSvhSeGdBRDS0I1xrgTaLvwuIe\r\nC3/HHmS3iLg0MfFZUr0WqeO92Qlh4ryOxWaFcsxemYIXzUEByL2QBw9KVr1o\r\nUuKtKbc8jI0e523fNDLj6NSWsE+wD4gt8t5jewYrK8tP4mLB62oMbPIH0jLk\r\n3IvWfmr+nESpTmcz9HQBtUYMhbJGmqz+VSK8+ApyT0f/orzR0nNEkRLZuviW\r\n34ie0ZdHfPhInHreRnXVbQYzd20P2spq/1FWCaBhi2sHdsjVtmyYJSn0z8hY\r\n58CW6taudltR9GSpSvu/g8S7HUWccC6NqbE=\r\n=bPAA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.4-7165bf71.0_1652731675189_0.5999380168530708"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.4-4e93dd5d.0":{"name":"ipfs-http-client","version":"56.0.4-4e93dd5d.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.10.4-4e93dd5d.0","ipfs-core-utils":"^0.14.4-4e93dd5d.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"102f592858ec8237081913452cf185a3e44d2596","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.4-4e93dd5d.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-TfCymqLUARgitZZWt3dKoUsVluepNgYKiCwtzfVKtZRA8WmwSlEJ9DAXmprMVjH0VOXltFgzw5E9XK//xzZkqQ==","shasum":"437276c85f737db9618876d408de9a159d2e7179","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.4-4e93dd5d.0.tgz","fileCount":463,"unpackedSize":491577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGl5D+sMyCJPWjcYtbt4lygoES9/SFebgS1qKbwGwruAiEAu2S41fu99AiQBo7yvrttTNUSXSYP7Qw/iFfKlzvgI/w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikNVvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSDQ//REHTD8LXpRvNa3VYslxOL91GPqf85jyM+v65cFKrcJbOPTQt\r\nJ9oAzkXsfxQJxmoVKxb/D00aCXIZ0ejjsG1rGZmz59qy6WGNmtn2nf+f3szr\r\nx4ufQfedi6CgVl8Tg5DwUUjqn6XYD5Ltv0UtMwQsn2AUGuH921agcdcTS5Ve\r\n2GgqkqF2nGwHzxzmJVHIHaeVh9Otn075Bfwr4h7UDxX4ojAhEZ9L6TtXR73C\r\nGZoqpYbpL7H84+QexJaApO4Ihvlnk2jM2a3mPuQsUA7FzQsfM7Z7PHYYvdjn\r\nsxvvOrosm9KJFKSTt3oUCAX5Eq2dwT+quK6stenQQXAmvWIGhy7FaK1lDBrM\r\nywOodI8W1MDmV/UEsOu//sjeDZxgaW8FkQCWG5Mmih94hdGX4A9nNJr/4YEc\r\njAXJnz9DU0BVztMCiI/I1fC7QMix1JHdMGg38uS2CjF9TGMmkze/8GwX+bO3\r\nz+LaSBrkDmaQPq7R0pA0LPtBrYnoMFk38E37sg45J1hTJuqUXruffa5iqe6q\r\noQ71Oy+cVfCEeK1MZezTq/rELnnyLUQXYw+FkZJ/J/mZVPLKzJDujJwPvr97\r\nFOvZeAtKG89g7nik+QLf+b9cFDUhG5Iu3MyqJ9xaDHbBMuIiMgY8xd/dbb0u\r\nS9CXTjvHyfYzDB6rwg+UxsM0nDZbhio3TAU=\r\n=S4lx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.4-4e93dd5d.0_1653658991062_0.3417723251363971"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"56.0.4-919b27a8.0":{"name":"ipfs-http-client","version":"56.0.4-919b27a8.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.10.4-919b27a8.0","ipfs-core-utils":"^0.14.4-919b27a8.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"b3b172fe34f542a72746b3af9351bcaf25bedda7","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@56.0.4-919b27a8.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-4/4yulGvORiRw2IMiIwDAUmETdTjZKPpCnEFkPjfJni4tlRN8818l0Qtp3t8rN344bW1U4rj5fM6MJL6N7D1aQ==","shasum":"5bd9b5ccbe83fa6fc53c536ae8de75eea323785f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-56.0.4-919b27a8.0.tgz","fileCount":463,"unpackedSize":491577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHLg2re6eb5Uc08p1aPW83wI3G/c9aHOe2Qm94uzxNInAiABB6kxu7kpVj/vx3f9g70qxRYlXyv5j5HVzhP3c1ib9g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikPncACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2dw//WjcKzn/mXzwWz0cXZazd0Btxx/VctZ6fZ6C0xFmufxOZsvib\r\nHYc5fkz//UawCK7gX3aRu8xqfMbIe1vJUrx+IzVGvgFTQIQiKBGRlNImcXy0\r\n2ES7qIHLxKJeU7+pEcuNbIWTrHRFKFnze5dts8wJLUTbUW5gK/YVqHRFN4bI\r\nqmZGTIniQgFD36/mItsILRKlYDJOGgxRu8W4drojNfUA408p1yFr0dA3Q5Qw\r\naUaf821m2UA1zQ8xVzewGb49dwFo9rFYXdJS6/o6KRn8rJy/JE+2cgQiqVSc\r\nFN2PPVvTAdnzbAzICf3YKJamAgiQ+8Adc4htZVYkRUxwAEHKaB6nrHBaPkQR\r\nYXABLE8TzwN7W8cJ/w1icw+7qKTNVL8CYUGNe2eSnME+l9r7GpzuvVEfC7rf\r\ndQkOigataeMavjJQFtaF1Axp0eV8xRuDIJJ9qMr0dz/ZlNjk5YyYpMX+yz3b\r\nCAAfxbu0Plq1r2C+uwLXk+Ub8S1X/eWQ2q5v5SO0o5yWdSpfnivNvf0Zwx3T\r\ngmcvM0qng0b+qus0AJqDRP/Z0kyrS3pRQkNFes9qH01TA49GGv2u3qEQ4NnW\r\npnGdCKSOeYo1ezCxJ0VLBZA937CSyVpefXOKVq0KDbz0NnH2/32HOZOSkiHv\r\nUeSS1GbY7+ILPDU5MhzEz0mIDfj0pZPepCc=\r\n=s+DV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_56.0.4-919b27a8.0_1653668316170_0.2643376757487046"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.0":{"name":"ipfs-http-client","version":"57.0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.0","ipfs-core-utils":"^0.15.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"38e78cc875309ba6316706b63865e399dbcd18c0","_id":"ipfs-http-client@57.0.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-nXxj0QckRIG4ImXMC4XSB+JM0LsNMHExIMGB4DK/+ArzDij51A0NxeYGrJpBmSnaFKX5I4BHOoWL5M8jm6zOVg==","shasum":"62042488b87ff0020f099de8f4f9aadbc90b507a","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.0.tgz","fileCount":463,"unpackedSize":491544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIEwMKoJlYl6JCFHSzcv3vnclkExk0aUPcdXl/vjPYzgIgWKIS8bVXXh/1TwcrmOux9tvzNp/nzq6kwAED2AW3aSk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilRhCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTKg//fXpkHBu9J2qRP7vGD+idKOC70y4TAMrG4W6kuVtV+br+3Z+E\r\nDveEFN7+HeFzfQjrRBvaBSBxDd1xlnuOXzurNjKMO3pTwr34L4HGLW0pHpug\r\nLjPyvhXtiAv/h+z6JAQQctX10mlgAcdlE3evr6/kzHMH3MuBfWPxWkGxNnbV\r\nl8Q4j1jViuqG5V1RIfgEJh4aUjz0EBiwSI8Y3eKCybxEfI8DWbYkOc7nvhDX\r\n3MsLF0Ac5E9s8xS9joQ2qgwlVNDeIWDC92Ond38tOWTFZCRLVFI2+Pk8ts12\r\n35LeBEtFoLrBAQ/VR+HGvmimQmR5RYLcwdxtVy5rQLSH8DSNzSh96hlo+ffg\r\nIRv+gK2QNpfgbSJ9Ju3Ow5HRoZ+136fDVTHOs4pbzacDp7uoSccj447LjRFZ\r\n3iWb+8xo5iq7+YLsRhwMnzzZFfgKFDHyyoucITyEK8+HDJ4aoUP9g1qklWcm\r\ng0uicvcd2ssdEZ/qTdDaJdE3rWTJKElEM3BdgT3QEQ4J718G7ZIqVopGYtcc\r\nw+w3ePgBxr53p7k3SLZPkfT3iZHTSfu1C2VGvnbv9UF+9FJZZaIiM3CefS92\r\nNUwieuob7Tn0xom1elZ5Lh9iJi2NFw8aBxa7UMqeKHSx+LCyWkb17gu6KBkV\r\n5WAkqeKLNT9GZfXvPjQXIjwDfCvymFIQ55s=\r\n=6buY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.0_1653938242765_0.368287428191189"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.1-ddfb899f.0":{"name":"ipfs-http-client","version":"57.0.1-ddfb899f.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1-ddfb899f.0","ipfs-core-utils":"^0.15.1-ddfb899f.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"87fbbf38470547cf82ced4c9fd2679df026170bd","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.1-ddfb899f.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-zTk9qdd8g0Rwovqofc6tcK6D0ugf4szhrJeu4iNxlw8hebkwArTpFIfSy74fanhIzkQLr/v9rusq9qXRk0rkHA==","shasum":"6469c16f26e8c6fe2e042a51d73210c7bff73884","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.1-ddfb899f.0.tgz","fileCount":463,"unpackedSize":491577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGEESnr7h5AaNPozhVlTOjiMHtnu4ebSeocqvMqyx/CAIgbA6UCeJlAnXO75v3AS+4UV4erZcYuPn3zXWL773k3tI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilSGMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqk1g/5AQqpx2gyEaLeIjXCiTwDTcaHISPiepcf217TxXC58gjyE1LY\r\nYxEo83zOjDinKj5BtUhm/EAJ4UNO/NvoUSA4I6Wg4hKCQ/Ufo0L3Gx1or8UP\r\npHAALge2iDQP9xqnh3mJxPQakRvL3YcbIn1yURCkJKu3+P3NEVM91qtd+iBm\r\n/M+XubBUFBuD2zhetefUyyeZf6QpCIMxpRSJNwyBSRk5/ldNbWmo22n859yT\r\npclj1mLepOuW5+5VtYOnHUUVFmYvGlVU19gYxRv/09ezrx622TKKDhg37MpP\r\n1iBOjgfxgRePrlL+A0ZnyGFF+36FeE6gcjqZuuqby2qCW1boflAFDtYoCjWi\r\nkot1r/bQSUrI5tS0BAsoUkKeCWm5Ssssm4kdeiOPJ3ON/asn4t5S9xB/U+0k\r\n+R+n3rAmPutqjdaCk8m4KO2zpzTXNS5uwAYkNr7RxRePbsBwJb0lWb0fn+pa\r\nGidYSq3ubKdDV88EDviidytsDPdda+3qPzMbCYihAMmso72IF/mqNPAXio+B\r\nZ8T91Oio5kaJs2t7tYfqzLT2Rdfn57Tg40OgUc8txuCL017hRcxjuqmuCohB\r\nhsqNFgRudckYfU8/nGaeBVikhSwn+0Y8R83Gu2/VdrvcM4BTuQHjbOdTcKHk\r\nfv/iaKcbhiKNmURdg6pZSZ0/fdtp9z1jqR0=\r\n=VROF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.1-ddfb899f.0_1653940619848_0.8596704115861518"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.1-764b4adc.0":{"name":"ipfs-http-client","version":"57.0.1-764b4adc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1-764b4adc.0","ipfs-core-utils":"^0.15.1-764b4adc.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"e174046b9ececfd2fb7fffcd8f6ad6211adc7499","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.1-764b4adc.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-DKjchx1ImOmjbC+X+C/ez4UcyYTBbsmY+V04wKJUewrZt8USQPMufum+6pjEzjHeoVelW3yXshbK8gwQ82s+mw==","shasum":"11931a5964eeccf4c1db21224bd013da66e3c632","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.1-764b4adc.0.tgz","fileCount":463,"unpackedSize":492630,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjVvHPb5BnANq4kHPPjLUHhqVrkasmr2pJ5RiWDAi9ugIgRlgZK9YKruXMzufIwWHeXdpWcUByVaCFIw8w3XoNdSo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3cQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorUg//e1WJVM4wLBTmFSte/dWk7TdNRiROl/HllibT5+cNZ5VDyy6x\r\nMn8+q8CpGAGaMIKiZUPM7bopnecVT1KuAuSjdEhJOYejtbASCggThFUH8Aut\r\nV1kLOkVlmujZ8imFHkZiYYE6o86VyOJmjdZKKWgLiQXgrYAPoxUpWouCkFVA\r\njk3jRQPSW5m5tHkx7sYk7ZJMLya516AYI08aqEAqkz6HoJB/kPHSW7r5ngdb\r\nXTWr87AKaECzOOiqIIkqLnqeZlf82dPovpkSK48nLFtCR6cLh0q8OPe67rps\r\n4hsx6SNQTHMMXIIKeMQVa9dqSW8lJyXmZLwy2G3bRC40v7+tYzTzCMzYhWvK\r\n61LjQi7PzmtwWKfHjCw9cA6eKsCYdIkzGgNO0N1nM/xRy73F3aLI3xWTu8O0\r\n331UW/3l3RIL2jxbXEpwBGsnkgGT6LCTJcSKcjR6psbQyI8c+jL2wXyeOWrR\r\nJNG6TnZY0TPv0FTtfld8ftu8Vfku7i/3wTq80uRpORdUCUZCAWLZwUAKZASi\r\nTh1sbyeFG+yQRcSwo9isDDi1T99UjW0MuolNmBf7UW1qX4uMcwMGkb578RCk\r\nO8i0PLJWsMXo6D+ZCGXliDGLXKYFXUXRFEhXFPcnQqXCFDRa0ZKXNt/vXivO\r\nBkHeFBoZLkdolriLSa6mThTe3mRKLTeOWJs=\r\n=OqAk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.1-764b4adc.0_1654093584226_0.22237890034741792"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.1-be025c89.0":{"name":"ipfs-http-client","version":"57.0.1-be025c89.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1-be025c89.0","ipfs-core-utils":"^0.15.1-be025c89.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"624dbe983b6f235125107b73ccce5ca3e45cbe7d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.1-be025c89.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-drV5f98bzoLTyOlNelZc45yY60ve+tqxr+pyw3zqY9qaF+tWPdSS4jLct5KBaZjHwHRpI9roJ9QVLaaHgdh5mQ==","shasum":"0d8ead6f56bc598a2397705711c6162b5ddc0b03","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.1-be025c89.0.tgz","fileCount":463,"unpackedSize":492630,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF9ecViuc1Ul2odp4YKMU2PRp/I6ayKyYiPrv3OQ+dGYAiA6pK9wu5pT6s2h0EaRYaI3qssQkgAnCY9iU43Nd+qb7w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3hGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpvkw/+OqH6DekHtuJLl9OfS5nEI5V3tLTkTIFbgFjjT5Xh01JrgaH7\r\n18WXlrbIFTc965gZx/xd6Z0/1vWllGhEeUj1P8w2HSVsmVGR05NdAs23xk5f\r\nLctTZevHVMluu6M/oay1t/j8kojI2Sxh6QUvXe/IjSVPjQiA/ZlezabbbZTF\r\nhCWBoNiLhp4HRh0gajsnxDRql5sMmAlABMFTIXhOLMFRBlThWOkSEYGRK88b\r\n15P5UAirHlSXUMcYvA30YxnmFWyvC69ob0WmTfUAYjNvFouC8BulaTXNiaGs\r\nqREdtlITb7T+0oxR0XAXA3HW8KBa591ia3GnoXfgRIk0RJTqOAlceXJGOwtM\r\nf5EI3gV5fggLQ7ycrpXHYaaYIhu/lFOpD9a/Xgy9VJEu8PCAltJ1yaA6fL7z\r\nkC88mG0uDVtRCq6E5QWwkT/gvvap19R4bfjUw/jLO+Oru/CvcG+Q9/WaBe2O\r\noxNYWNSQ0gNiD7KybE7CcymBIuCK4HArhVz0BPy/o77K1hwMID0FQ5zjYP5k\r\nuS0+NRy24A059vwSoOq3WHOunMLyI5xyoHkM7M5bdv/DKR5F4qm1L8keNWNs\r\nTvOe0rbSyPHrwBYgZu1BTy368rnVlxnaiQeooAE0FPjwJbxQd6y2/8YJr9ix\r\nHq0g2cYQ9BxkOh1u/6ckaApewdjJuLo+r4c=\r\n=E+TX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.1-be025c89.0_1654093894270_0.5604586456113101"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.1-87e00a69.0":{"name":"ipfs-http-client","version":"57.0.1-87e00a69.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1-87e00a69.0","ipfs-core-utils":"^0.15.1-87e00a69.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"4aa63330e4f3184df8f4d39cd0880c0ac903e795","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create('http://127.0.0.1:5002')\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.1-87e00a69.0","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-B3bqzBVyxkrETnYUf2bKPsHKuxyscvr0OmIwF1Vt0vINnF0hsgUmhnIn8hiQ0BI/BY9yVauR2OELWXrXQaUHKQ==","shasum":"a03fb4c5e585e91388802dfcd640b1ce236c2435","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.1-87e00a69.0.tgz","fileCount":463,"unpackedSize":492630,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmxWcNuK84a/dlFoUfbJkRbnKDsu0OBsa8g8w0D21ZAwIhANHuTnDYfRqZw4ZfI5G2zlHTyTHy2FXnokmmNvOf26WJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3lfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSKQ//cXOIz0U1RKRjv5yeZYhoEbXmL+RJ1tuYbYz8oZplq6RCeU+f\r\nVaymmTlnwU6rEufrX8PzWiybRwEqlWsyICa4txr3ZWESfGVi8w+3nJaux0GB\r\n5Ki1a9M29rG/FSP0RysCZ8vZq8W1EdvdusGYX71irpmXTUPSs9HJUZtCMTP8\r\n6CgUgnvxUnohtsTzFryo6Ldk1VYnQwa+sznXqfAg8Nvwx4fQq0yGjeqKH9De\r\nFEPD62wOSnWhZ9/07fuhwKSA0veif9oQhCuOuaSLj4oCPRuRtTG7i0ubZpMB\r\nAZ2tew/QQTlEaDMaCCapmojq9yE0URekFtnfPdK22htJKkmTWzc6SVby7Wqg\r\nhaQFEOvbNQpowtyovjuHbmW69PRbTSSzNoJq5WKDo8rsWGmm8DzdNff77/el\r\nuN8Fe65JcbFWtwUg3RJSt9uuLX0t9VJKnUHE5ly9M/7gt1DAHvyIp4eX8yMu\r\npeysJUxMfNEG1hPIKOlaLx2Fa4uZSJkfhAaKN/J2SllW1ONNqayGqQyIbjSv\r\nSzhinPKYVTRfFUQi9Forq+IzmRmqAgHfr6VzAXctySwteI46SFg+WACwLgyR\r\nD7rHHdAMrGEnjHwp80mq2mO30CZJXPCk99GOchQDsRORWIsgwJZWw/RZiJlu\r\n4M6h5ryzvndkuv/cQtyN2UKxJATYGVc3fLs=\r\n=VP35\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.1-87e00a69.0_1654094175654_0.1993532054552678"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.1":{"name":"ipfs-http-client","version":"57.0.1","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.0","ipfs-core-utils":"^0.15.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"548cfb215e8afa8dca64d3c38fa13feecbe577e2","_id":"ipfs-http-client@57.0.1","_nodeVersion":"16.15.0","_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","dist":{"integrity":"sha512-ULwA6DenevB2qnVFxUXhSJSkHaBJIANHmUHKQwuu+y3O7oo2Vy8AmbJvstm37bJT5pWFaj9jZdZ4Am0VwHn5fg==","shasum":"3db006a4307616bdd6b0e9dba8f6bf09126cfea1","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.1.tgz","fileCount":463,"unpackedSize":492597,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgtBKxIwyDsNYJSQbyVgjg12v/CNPpHL/LPPwEH/5CUAIgTOmMetBpJISgQUCBOMtHAVMNetgCNzt/A2JdOb/fFl4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil4LJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvRw/+MmUQrUR6vgoELhnwxuUGWGLk6ahzQ8ZTl6TNdh04dArobRH4\r\noo+uQ84Zy+AfnKzI7zPO8Do0nvqb+mBNPPIcjnKorEoVFw1IZ6bkOHjzBMzg\r\nWLtyN9k3e3jgjGDiFwQsrUapUbo6kRe3NQclNC4jo14WLQc6g7AwaCHmzVts\r\nPpV/Bme7zhSLprn5GI7B0wV/N4epvxnFq3aeIzh0U1+mMlTji/DCmjL04p6e\r\nqgTWjbfS3xo2a6oRFKtXPb2287iTO10ivqfDxgF38RMOM2EDJ3P5E/Dbudyd\r\nXaZ/AG7zmJuNVZ0eQHMjfgBge+AAkJFssXt+CCanm0UdtLfLCzaYFQbuKoGJ\r\nSV926qbqZUnn4RLCNrTM4dSK2W3+LDlCdqBBJ076EqEXApLTS71sDfL549qU\r\n1TiqtB/tPbxZ4+wTjXUMFd2Njm72bYlmgKHi+WNOUyWsl5Ps+ILxSBGpvnR4\r\nEh5plREeRy077hyRGIJm0oXCKjSDIQVKpL5uL+XV5fO9Wu8lZCrT0HZhHR5a\r\nK3X8epLS451hcbyKveJIjEPJltZI6zkKSevzc6KqgaLNzrQrj8DwHubKPMVb\r\n+K9SC647E6KDiOt+1G3sGWPqhRDNeLE/QL6RgSLGy8vGX6h4S12kwZXzecDU\r\ng27g6pV8pVd9sFScQwsW4xsY52WboDmM6f8=\r\n=rWJq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.1_1654096585488_0.145407999233913"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.2-70e142ac.0":{"name":"ipfs-http-client","version":"57.0.2-70e142ac.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1-70e142ac.0","ipfs-core-utils":"^0.15.1-70e142ac.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"1a6e6bef85bf35b9328b61ce15d312f1961f5fef","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.2-70e142ac.0","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-8K/IDVuJP8pFF1KbBnQC2QGG0X8Fk2qU3dh3gZTZMQjMgtreE+EHO/Od8ZBycgFk6Jmiu7A6fG1n6ks0z/twrA==","shasum":"2d6483b1ab3e33593467fbc22f428c381fec0875","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.2-70e142ac.0.tgz","fileCount":463,"unpackedSize":492647,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsaWjvvszoM8l/5ajc0XmZKL3bG/t8Po+/vehf1OWWRQIhAKdr/F/fqyBxOSV5RvHG2m9Kj5O4+blYAF+ivTPoZVZK"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJip18hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgXxAAgJq7LxW3Y/aGBt/gRX1R9wITZ4ij91VoApy2G9jCkNNUk4no\r\njjXl63yrfsIgEc/R1MYOeeV4ElEpXHRAYzS+CnZ5xIfJk89wxKAvKjBa3yeO\r\nJTxZHAHkSjDcjQ3LAToBo67qsygARUg1jG/TgsOgZD7Ocjwq5xAdBYX0Upuy\r\n4lPHgvMMaXrtDryennoHgbZBxBVuKm0B7YoaZhroyrdokGa6ilXXf0ggjNmU\r\nRtUPxXyA3lusNSf5d2PwsZpaCZv2xPPEySlq+5n0MC2gu6S36W08KdJLE9A4\r\nuAPaVtVi5WMAyHL7pImZP8MknC47AZ8fYpM6w5350Nyi6g9EZY0TzISlJNLE\r\nk2HKpwJ12s/uSbtgMF6uI0t99fNF0i1Q+ZvjpnOTKQgOJqu+xLw5PSc/wdMy\r\nrzxMo23N5QP1EQ00bNJDLnzdNzNOQkJwUVagrFgD4hWSf227GNNt97snxn7p\r\nD44vhd45KowA77TnydjI5vLYYRViSbH81Kq2TtZWiydaLKjBQh7bza3qvHE2\r\nfeKHUjJVUEeFCPtmHtT9tIA+OVPmPxwFHOqgut1Hl7YODkdzmAnZjbsSBSvB\r\nQiln8zK2kB2W2pNE1Hu8orqNPoPcFbXZYS5pxinhPO7WZsdPeZiDkM6DUu5X\r\ncvu3NJlOYdYAbSjrbo2CVEuEtzijvjsQXQY=\r\n=sb78\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.2-70e142ac.0_1655136033640_0.5475796310742529"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.2-7be50bd1.0":{"name":"ipfs-http-client","version":"57.0.2-7be50bd1.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1-7be50bd1.0","ipfs-core-utils":"^0.15.1-7be50bd1.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"8d1e141b6d72e6dca9162859d36425eab90d8b12","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.2-7be50bd1.0","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-TkS3BO5ogg+SU+8q0y7WRb5zJiHoLxuvvzR0EMNQZfkXLFWV9x7Exvpcl9qzhHY+7kTl3C38urANFZuhvRkEAg==","shasum":"f7fbe8452233bdc1273b900918b6ac6c5b362832","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.2-7be50bd1.0.tgz","fileCount":463,"unpackedSize":492660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHohHlXHeCFr7VjLGgTgmExSlVmhJcwk47QmfYcgUmeAIgFSvaH1jm5EVpx44mH0ug+8/IfBVhZBj5CbVlp/dEGnk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJis1X0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0Og//dOL7/LNgqGKh83gq7LGgEmui0cGUkz1++MRqYloikiIWG5XZ\r\nlR4hXlzj/SHm8xXiGb86vBoEpHzoBpQeTHa2zgxyUbS9CW5LT3CXYt4hpGO0\r\nK5oqzCeR5H5wXcaGBHDzfhpe9zGs+GkUwcV8ucpbQ9LkurDjtz1bx0j4aalw\r\nUq99IDXZNuJsb4+TGadXIuJ/0fQgvSJAzdduDgcImHAEGuK7WE3wtPL5a8Ih\r\nfLbCessG4pSfLQslF9agvJNXQRSZAH3KMAzNnfWGIVNqoIn7ABecQwW+CSnC\r\npmxfbQjIAw7k8gdeB+w9oxwFqS1jOb+r4+8ozC6MxG/wSH6i5QYmB4zH844E\r\n31GzraYKJy0QBjNQPk9yIvKqUb0qjydWOG2+dCk+/bJfeCy2GRXE0Qvfxtd4\r\nZoA1vcd0QxvrLbwFNYlBJm6+3BFa9HezuaRT2oJX5yp6Xwr4t5HVoHh15cAk\r\ntGWasBVUAJhdP3AXnndZI4BjxCThwMml7qYCV1Jxddk+SgSJM4qrWWdB753/\r\nNSdIAnjE1rNwYLxe3VLcX9YwqOt5uN+F8aoAimzHcK9laBAh0PKePVD6JupI\r\n2OJW7ZDeowbl3/y2tGs30mzELQ3egtjkB53tbIv18QTliafP7/LXTJidkv27\r\ng5jzk88gWLs5anS6OiNMrZ0IbrGxklDcSKQ=\r\n=JiZL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.2-7be50bd1.0_1655920116422_0.5615236688778475"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.2":{"name":"ipfs-http-client","version":"57.0.2","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1","ipfs-core-utils":"^0.15.1","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"c1cbc810679405d5a5c0fcca0c5c7aaf023b2d22","_id":"ipfs-http-client@57.0.2","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-byFIkNYrvqFcVUNkvlxegZPuWOHMDJBERrhlTiG4hhAJVLkUzHji87it0/a3nugVr4Lf7r/isgu7ABd2RuU/FA==","shasum":"8987754b499d72ae6b373f8acec8b8b61160b321","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.2.tgz","fileCount":463,"unpackedSize":495291,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzfT3/scHUXpY/bdg0jVrOIi3axwcTABWOqZ1HzyAOvAIgEFFw6Mris5LSPWDgr63bhmFRxb+NHyfILEw1oGshL4Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitFaFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/tw//RxzfvRLn54NW3BnJ+amMfvlROMocoUKHFgMFOnmyV0Q2MZ1K\r\nQG5kjym9DXt4ysa/DIlRlXTcB6TomBR7Er9pqvt/+ucRcrwvorq4wmAQnijA\r\nEmXe4xrNGXN4Yhg+SGOkm1DdYMHPh0ebIQosJVKIIVj2u9Xmsfpd2TrF+iHB\r\nvqpTfOtK4qTtEjWKiiHMaS0TCZZLTNNLpfq3oUe/Da5wTvT2wG2yyUriN7G7\r\nA7Pnu8joFBwiGdjJaGIR4h1JPe7Fyy2Otat9BUlI5fr92fnPXJ0RYm5ZQokB\r\n8L18kd0su8Ka0fNBNm3bApqzZmuh8vISxmRL/LQKobXB3xs581QwXdX7/0Jv\r\npGQnMMMp9W/x9YCIeJinQy90cZ892sAK2odRTjjn45s/i69QGxTAC5mkoJHW\r\nWERmoPe1tgPsFuGCzxknETpsU9qu0bibpmBhsCC6O4TKefZoj68X4ETPYrco\r\ntek7tf6w/arDhHLrV16HK9G3VWH4gR6I6yaE2vKt2exZom8h5OWtHP45Xh3c\r\nR8OcnaE6hbodhb5QsXAqfmeBdG0YfZwVt5ChhJfrVSxbyvMdv1lA86BA5e5f\r\nsh7jkX38tj+J2DUCZuKXr5v2+158FcGLuwmgkmqWkJwE2dU1mDYkktqLZuR/\r\nruim2QMHPazDvhKqRg/bEZNKnmlgbSGVYXM=\r\n=5/ab\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.2_1655985796816_0.17010001791315332"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.3-00bd3dd0.0":{"name":"ipfs-http-client","version":"57.0.3-00bd3dd0.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.2-00bd3dd0.0","ipfs-core-utils":"^0.15.2-00bd3dd0.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"5e5669eefa320838c4810adf62356b0039209ed2","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.3-00bd3dd0.0","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-j4DStQ5FNGArVXlB2+Hp77C0LF0pFgffvkOdNipGTVHIvoQf5b2RDLWzp3HPBWkn9Q87sniYHONJsNuZDCRPYw==","shasum":"4aa86e32e6fb1d4ac1f153105ac624315bbe471d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.3-00bd3dd0.0.tgz","fileCount":463,"unpackedSize":495396,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICu/KZWZ/SEu/+wfnDEm2+0QLiaQvG1kEehVLrEBNmU3AiBnlvO+u+NRGJ2BV177GdU85j6pKpxDcTHk3UftINjbgw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitYRJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMgA//XaalYFpJkFN98ct3pCl8TJQnMfHAfqCCdaOKhK3zdm9Y46h+\r\nlo8JJV85fnthtznJJDiqK5K6tsP9AEoUGmvPoATptTe/hke4q9k/dWDANQZ/\r\nm/3Xm95AdWwoapHtaBmcYjj9RUtJYRPyqvF0FIg2HQvb22+opMmGKvgOkOxM\r\nF7kUs5ySOEmr/oBf/SeTYiteFNgB0dIYgyHdXOTcBdxkS/jx4LPSyPEyWCXp\r\nC/7k2hAkPVaOZNKWlmRUq7z2DEigDDfdFg/9ezXoEYx55Dhe76djIuhPdyS0\r\nhVQQJG1dtP3u2f+D/7Eb6WSC4V42OD7swsrxrzN2V6I7f4MdUcb8kwCypxvk\r\nZmi1uhXDoL4c9N3i7SKZsNWKRjKqSmm2f5a0z1nCHqB9fhT8Ja0kNMcEP6OX\r\nE41Wnr4grYZYIOGpWqkhkTnElo0JNVp9zckUmOMFLFgQ+aDSKelFa2G3QJpG\r\nNkP+hcZ9ZriMzKFAeI82k73GmobOpCYL4Y2vq4h6gznQhr34XSr56ormKIGT\r\nqIJHajQ43RptZjcZ+0X0NQ3+H5QDBF/hfxayvKQnVoQMBcTCa5zzLH7lk5x8\r\nQpKmJOM4qQMxEwzdlqPokJbtMaJzcwNwNrNYSrWG+RGdINvf05IhVFkiT8fR\r\n7qa7C30T+09V2k1KLUTHwv8YArW9cou4GD0=\r\n=tJZF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.3-00bd3dd0.0_1656063049324_0.32158087409083747"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.3":{"name":"ipfs-http-client","version":"57.0.3","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.1","ipfs-core-utils":"^0.15.1","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"965f5a4e00254cee48fca2127d95209deaee09cf","_id":"ipfs-http-client@57.0.3","_nodeVersion":"16.15.1","_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (linux)","dist":{"integrity":"sha512-IOqxcMei7Y2bxU2Se98YB+HEv2rZp9aTbkQjNY4XgoeG3eMp0zU/6tpguOHzC5a6SOCojZRrcAAZq2RAwdmrhg==","shasum":"8597726cda897bbe932d104dde5d754738614de5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.3.tgz","fileCount":463,"unpackedSize":495363,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCz0/WZ83mJT98LlQKtJmVfzDJ6g40ty79g7EdT/Nci3AIhANjMtyAX/gbsqvHAxuKDugO0PW8ltBVS+WNHjZtMDmZL"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitZEWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUYA/8Cf+lL8DXjsHSwvMljt7AZ6NNa+B3Xii8L0Z/ZgujcyRJSVVG\r\nEFH4ynY69a/5k96hC3NIx2K2PtJZWKyKQuDUMAu4ee9oV5chXX4s4jUTdMqp\r\nOQgjjPmSZxzZVF+2Mjwt5COxzyrJsgnse7FKmy4VliBtLl7hViNc1fZT4NIb\r\nxCOM2QVPCQLu/mbRYr9C/FAz2r9jhvQpalbb5VsoB7oCfYYM3PCSiNY2yuns\r\neJwS5I6TGAeim5usU1TVfGQHG9i01QqBqVIO1s2MhIeeZ8ujeQUMR92SaQL0\r\nX3vNhrdSNWoPqQdstChnqGGa8cj8B4TsOyvbciU2XjaPvk0NqgHjHPcQCjv7\r\niRW33OwO3Ps+F2I6gV7cGTIVIGW0NeLKoJor5FFpDdXHA0NznJCnv8VICN6k\r\nLkfHySiB8cLiP2QMOvLHTODXFU9DkQFjCnIlSPCmgbFHEvg6v5lUm4v6T6fb\r\ns+f5r9YZh1+q7bxoDdvQPlxB8wcvjlw3G69MtMAYrbw0pj0d32QJtm/AWsCh\r\nxQb+TEnxwTKNfQDLSG0Io0Qj89LEfNnU9EdSr8yzhpiljzaGAWa3UewvG/kk\r\nKi0bmSXJvHM0XSexNvQbuw8KrrxVnv20tFCIMbSzarjju9qyFDRHqkmc84H5\r\nZwRjPPJHYsTisnRRwFW7ZGj2PRs4skROJw8=\r\n=Hq5n\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.3_1656066326717_0.01825891505912325"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.4-a05695fc.0":{"name":"ipfs-http-client","version":"57.0.4-a05695fc.0","description":"A client library for the IPFS HTTP API","keywords":["ipfs"],"homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"license":"(Apache-2.0 OR MIT)","type":"module","types":"dist/src/index.d.ts","exports":{".":{"import":"./src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^1.1.4","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.0.0","any-signal":"^3.0.0","dag-jose":"^1.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.11.2-a05695fc.0","ipfs-core-utils":"^0.15.2-a05695fc.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^11.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"engines":{"node":">=15.0.0","npm":">=3.0.0"},"contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alan Shaw","email":"alan@tableflip.io"},{"name":"Alex Mingoia","email":"talk@alexmingoia.com"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Antonio Tenorio-Fornés","email":"antoniotenorio@ucm.es"},{"name":"Bruno Barbieri","email":"bbarbieri@delivery.com"},{"name":"Clemo","email":"flipflopsimsommer@users.noreply.github.com"},{"name":"Connor Keenan","email":"ckeenan89@gmail.com"},{"name":"Daniel Constantin","email":"hello@danielconstantin.net"},{"name":"Danny","email":"dannyid@protonmail.com"},{"name":"David Braun","email":"David.Braun@Toptal.com"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Dietrich Ayala","email":"autonome@gmail.com"},{"name":"Diogo Silva","email":"fsdiogo@gmail.com"},{"name":"Dmitriy Ryajov","email":"dryajov@gmail.com"},{"name":"Dmitry Nikulin","email":"dmitr-nikulin@mail.ru"},{"name":"Donatas Stundys","email":"donatas.stundys@necolt.com"},{"name":"Fil","email":"fil@rezo.net"},{"name":"Filip Š","email":"filip.stamcar@hotmail.com"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Gar","email":"gar+gh@danger.computer"},{"name":"Gavin McDermott","email":"gavinmcdermott@gmail.com"},{"name":"Gopalakrishna Palem","email":"KrishnaPG@users.noreply.github.com"},{"name":"Greenkeeper","email":"support@greenkeeper.io"},{"name":"Haad","email":"haadcode@users.noreply.github.com"},{"name":"Harlan T Wood","email":"harlantwood@users.noreply.github.com"},{"name":"Harlan T Wood","email":"code@harlantwood.net"},{"name":"Henrique Dias","email":"hacdias@gmail.com"},{"name":"Holodisc","email":"holodiscent@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"JGAntunes","email":"j.goncalo.antunes@gmail.com"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"James Halliday","email":"substack@gmail.com"},{"name":"Jason Carver","email":"jacarver@linkedin.com"},{"name":"Jason Papakostas","email":"vith@users.noreply.github.com"},{"name":"Jeff Downie","email":"JeffDownie@users.noreply.github.com"},{"name":"Jeromy","email":"why@ipfs.io"},{"name":"Jeromy","email":"jeromyj@gmail.com"},{"name":"Jim Pick","email":"jim@protocol.ai"},{"name":"Joe Turgeon","email":"arithmetric@gmail.com"},{"name":"Jonathan","email":"jkrone@vt.edu"},{"name":"Juan Batiz-Benet","email":"juan@benet.ai"},{"name":"Kevin Wang","email":"kevin@fossa.io"},{"name":"Kristoffer Ström","email":"kristoffer@rymdkoloni.se"},{"name":"Marcin Rataj","email":"lidel@lidel.org"},{"name":"Matt Bell","email":"mappum@gmail.com"},{"name":"Matt Ober","email":"matt.ober3@gmail.com"},{"name":"Maxime Lathuilière","email":"k@maxlath.eu"},{"name":"Michael Bradley","email":"michaelsbradleyjr@gmail.com"},{"name":"Michael Muré","email":"michael.mure@consensys.net"},{"name":"Michael Muré","email":"batolettre@gmail.com"},{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com"},{"name":"Mitar","email":"mitar.git@tnode.com"},{"name":"Mithgol","email":"getgit@mithgol.ru"},{"name":"Mohamed Abdulaziz","email":"mohamed@mohamedabdulaziz.com"},{"name":"Nitin Patel","email":"31539366+niinpatel@users.noreply.github.com"},{"name":"Nuno Nogueira","email":"nunofmn@gmail.com"},{"name":"Níckolas Goline","email":"nickolas.goline@gmail.com"},{"name":"Oli Evans","email":"oli@tableflip.io"},{"name":"Orie Steele","email":"orie@ohs.io"},{"name":"Paul Cowgill","email":"pauldavidcowgill@gmail.com"},{"name":"Pedro Santos","email":"pedro.santos@moxy.studio"},{"name":"Pedro Santos","email":"pedromiguelsousasantos@hotmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Pete Thomas","email":"pete@xminusone.net"},{"name":"Richard Littauer","email":"richard.littauer@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Roman Khafizianov","email":"requilence@gmail.com"},{"name":"SeungWon","email":"ksw3894@gmail.com"},{"name":"Stephen Whitmore","email":"stephen.whitmore@gmail.com"},{"name":"Tara Vancil","email":"tbvanc@gmail.com"},{"name":"Teri Chadbourne","email":"terichadbourne@users.noreply.github.com"},{"name":"Travis Person","email":"travis@protocol.ai"},{"name":"Travis Person","email":"travis.person@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@ua.pt"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"},{"name":"Victor Bjelkholm","email":"victor@typeform.com"},{"name":"Volker Mische","email":"volker.mische@gmail.com"},{"name":"Zhiyuan Lin","email":"edsgerlin@gmail.com"},{"name":"dirkmc","email":"dirkmdev@gmail.com"},{"name":"dmitriy ryajov","email":"dryajov@dmitriys-MacBook-Pro.local"},{"name":"elsehow","email":"yes@cosmopol.is"},{"name":"ethers","email":"ethereum@outlook.com"},{"name":"greenkeeper[bot]","email":"23040076+greenkeeper[bot]@users.noreply.github.com"},{"name":"greenkeeper[bot]","email":"greenkeeper[bot]@users.noreply.github.com"},{"name":"haad","email":"haad@headbanggames.com"},{"name":"kumavis","email":"kumavis@users.noreply.github.com"},{"name":"leekt216","email":"leekt216@gmail.com"},{"name":"nginnever","email":"ginneversource@gmail.com"},{"name":"noah the goodra","email":"peterpan0413@live.com"},{"name":"phillmac","email":"phillmac@users.noreply.github.com"},{"name":"priecint","email":"tp-dev@seznam.cz"},{"name":"samuli","email":"samuli@nugg.ad"},{"name":"sarthak khandelwal","email":"sarthak0906@gmail.com"},{"name":"shunkin","email":"hiyoko.san.ipod@gmail.com"},{"name":"victorbjelkholm","email":"victorbjelkholm@gmail.com"},{"name":"Łukasz Magiera","email":"magik6k@users.noreply.github.com"},{"name":"Łukasz Magiera","email":"magik6k@gmail.com"},{"name":"Xmader","email":"xmader@outlook.com"}],"gitHead":"06da5952a6d61e890ae37d305b99a5f174a1555d","readme":"<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n> A client library for the IPFS HTTP RPC API (`/api/v0/*`), implemented in JavaScript. This client library implements the IPFS [Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) enabling applications to change between an embedded js-ipfs node and any remote IPFS node without having to change the code. In addition, this client library implements a set of utility functions.\n\n## Table of Contents <!-- omit in toc -->\n\n- [Getting Started](#getting-started)\n  - [Install](#install)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Contribute](#contribute)\n- [Historical context](#historical-context)\n- [License](#license)\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n### Install\n\nThis module uses node.js, and can be installed through npm:\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n* Check out https://docs.ipfs.io for tips, how-tos and more\n* See https://blog.ipfs.io for news and more\n* Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| url | `String` or `URL` or `Multiaddr` | `'http://localhost:5001/api/v0'` | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String` | `'http'` | The protocol to used (ignored if url is specified) |\n| host | `String` | `'localhost'` | The host to used (ignored if url is specified) |\n| port | `number` | `5001` | The port to used (ignored if url is specified) |\n| path | `String` | `'api/v0'` | The path to used (ignored if url is specified) |\n| agent | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only) |\n\n#### Returns\n\n| Type | Description |\n| ---- | ----------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take _additional_ `options` specific to the HTTP API:\n\n* `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n* `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n* reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n* [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n* set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for _all_ requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Contribute\n\nThe js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out:\n\n- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**!\n- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n- **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n**Want to hack on IPFS?**\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## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\n\n## License\n\n[MIT](LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large)\n","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.4-a05695fc.0","_nodeVersion":"16.16.0","_npmVersion":"lerna/4.0.0/node@v16.16.0+x64 (linux)","dist":{"integrity":"sha512-r1GH/ueZJbMRZyTlxaz0pQJyFco69wavPy+/rnZ/8PvewGAOfKATeFmcf6pTV5M45Ouhx4qgiPQOhX5sVBwPUQ==","shasum":"11f8404393219fb9d172f0d0293530fdc8aaf9ea","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.4-a05695fc.0.tgz","fileCount":463,"unpackedSize":495968,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXoRBaG3iC5P0xBFuo9C864w2EBzlo3REAG+5tiiF9/gIhAI5oZ8HCZ2ajYwybjg5bJJarm0M3XwRECqwXFs5cx7je"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2AGMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+Yw//akc4X7EsYszyvCgrXRBrLxajlsrUyvbwu2iTgv2uNLT30bvi\r\nv5gN0R4zrWSVxcc+kexvh1XDrfwMwWVDUhcZzKTOX29q4h13xit+NU2DZoyc\r\nwBqt/8/XgsVrMtVQjWytijBBfu5JSF3kp0ZzC6bauO9yIHjCD2qQbvxaeJ0z\r\nbTY0+k1E0RbLC2Ub4AV0cbUvSsJ9H8WJh7fmGPyDIU6c9+i2LaDjh8VP35CE\r\nNI9Lh7As7rEyQGh7x2+Nc0zAWffcoUlG4CMHHlryUeN2NReJ8TVSOIH0SV4u\r\n0R/JxoVrO3WKll6DhE31SD+w1tuWXHIhXH8eoBAgwU3FZY7Sr5gTAe1ccElj\r\nL69vOT33m5txsWNSDfiN7W8Sxbfy9F99fzVU4fIwNqNbwlpXPuiTXY2GQYHP\r\n7CmU/KKySfI7+PFFY4b+C09/glnW+a/asClRfATq0iHkEdNmTfieif6MeQvQ\r\ntjYyiGnx0RjZNAt7WtoXzqq0Icc6UJSMkYPz9hQV3S8M/Va8Bkvu0bIKP3aU\r\nfEUaKBlxzh/oXEj/LMXtaTmQmUBSGYmTyw4QKIdrdXwjloU0Y+/4kBBzlkEG\r\nQNcwZrpTrdMM285qczA0VOxxqSV3yK3TnvFJ9gCfYGhE4tIrSlAM3B6eFrBt\r\ntY8R7rsjQvoI3iRjXMvE8sWX/DptIDUId7I=\r\n=mFPQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"ipfs-npm-publisher-bot","email":"alex.potsides+ipfs-npm-publisher-bot@protocol.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs-http-client_57.0.4-a05695fc.0_1658323339740_0.10534368694580998"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.4-39dbf708.0":{"name":"ipfs-http-client","version":"57.0.4-39dbf708.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.1.8","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.11.2-39dbf708.0","ipfs-core-utils":"^0.15.2-39dbf708.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"a2f1f57d7993d04b2d19c3d7ecbeecc95a54d2ae","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.4-39dbf708.0","_nodeVersion":"16.16.0","_npmVersion":"lerna/5.4.3/node@v16.16.0+x64 (linux)","dist":{"integrity":"sha512-9hzdiUqJwUe2ns3Evn5k8XhXU9mnXf+7fLJVZ0XjbzsDY5+7FURYIdfe+W42Xhj9JiGJEm0kwoSjY+nswVvccw==","shasum":"9605edc042d6f2f09a9ddb4a66bbc8d122b979c5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.4-39dbf708.0.tgz","fileCount":460,"unpackedSize":488864,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEUGLY07drB7ibYbaYsjOkYuiHxtjZf4dDGhZqG9EvhwAiAiw2e97lvPRxLNSraBMze6mn/KvlZgwNl3cUB+/jyvYA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/WDhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTpw/+OSSCAEj+iZ0wssIorc76OhXlsLI7aeIKKRpkGA8oTDQoTuWA\r\nKKtzkHjkdknxsUNO940SyToZpsP9YA6KPI8FGTvqAZbIQ9aR8L48+MtWE4lJ\r\nS3DKUUdtZhI7rWszLc3WWW5qk8i6MX0lpL/c7WJA+R5In6xlNwYqb988t+Pf\r\nVD3rBEsNyOaU96AWoxMRsOMblyQSRyrlKcydodUAkgkdQzuf//+Gai9vxNmz\r\nJ5koRhnFXvmlPebcY6U5OWlweDuX256mE8z85GDhrr/Te1DVNH0e6NktnlLj\r\nmuwuGYs9wOZjLgMR5fz3I4vsjsFn1aar51nT4/y2PorBRjq3EjvQJTF7kc8k\r\nhVEnTvgJhjJbi1WE8WCofwQkpXhfSCH2KcX/++wNSWZBSZn7/KnsPE3EIoPl\r\nLybUrDzQlAcZJKiTv0jQoJgBO+n14THB/brPaFeHalwtjZ0u3KOzlc8utY14\r\nyZ+YadoFGG7Y84b8luURmErnNuqsY+dYqPxlMb/R5lR3jWkdWUjaAx4EEmKV\r\nH3USXyV+UHq14B1od0lEcbHoKUrpE900Zc5m/bEV5ORn/O6MV7EodUoe7XMM\r\n9EId+IeBc9rPO7TQ3ZyfPbp7eq8/dDB+C7isL7iJioG1Q8i5fu6gNGaqEg7J\r\n6b7NXVqNGfhqpZQmNOy7yAuPG7yoLqyR6qc=\r\n=e1+A\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_57.0.4-39dbf708.0_1660772577033_0.9818357062019367"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.4-8f351a89.0":{"name":"ipfs-http-client","version":"57.0.4-8f351a89.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.1.8","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.11.2-8f351a89.0","ipfs-core-utils":"^0.15.2-8f351a89.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"59229f179fc680ee9075d2cc8deeceb7ff1b27d8","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.4-8f351a89.0","_nodeVersion":"16.16.0","_npmVersion":"lerna/5.4.3/node@v16.16.0+x64 (linux)","dist":{"integrity":"sha512-LUY2lBxfSkhS8bEBryg4qgQJ7Fbau5Ez9m+NJuZwzziRaUsfAtXIgKxYL9EJKTYtFsCu00ujkce+M8xBLbZMCA==","shasum":"fd83db0c850ca08b658cb8d0fbc9add05a3e40e9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.4-8f351a89.0.tgz","fileCount":460,"unpackedSize":488864,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+bveZlYnWYfbiB1EaMFnt5awK5c0X9h13AFegufbVQwIgVHkAiDs0Frv2V0pG1JvWr5c0WxZ7y60dhi0xTlQcVJg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/XdaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoyEg//ZJTKnvZUV96a04VSAFI4/qnC/VFOL3OzFtrEGoPphcq21mhV\r\nLoy8FctZrxPmaJZexLpKxKimunpXakTTDy6/G6Fmqv6edPB816aXWv7VtylD\r\nxOZbpksHIu8wnPm86Ega1cPKOhlmT0nesmvItpx2aRYOV55mKkwjfs9mlRcg\r\n7gV3RXqDhEf72JYDrKkT+HEAT2T3b+04go7zZanbza9Zf9FA6sgA1dwzqpoA\r\nWJbyrtMIHg7VeLGpA2MF/rhkApijTt0AvJ6WqbRhd1g5Ieoj06DtM5TjgNtT\r\nCPOozLgOrXB79kzflYqgqR7xi2eREwCNh0wQoT/orvFWZcn6UJjXfzhNTIDy\r\n6p3YOq8NqM4ePcFdFwYvg5AV+UwYI/jUk4NzJX0vMXQ7z1eN2VU7uKQTu9K4\r\nw7ELxdUeoKKC6fukbsHe+YrL73k9c0FEVdiSbk3xW3e2tSuQp7/bnpcMjs3G\r\nNaS9HgMzbJvUFyoBdKvUW0kSbHZ1G7Ty62cMtCTxA+0+U6m9Bke2u4I6oE+s\r\nAIvMj8gydD8A2ooEbM6E4zvj5jRAeb2WphzcuzedCIs+L/5eHEiCv3j/YVAP\r\n4wqs4o95T3eWE5ZSA9Qq9XuZRBFsWQhhcqVTzLhkVVxLa1tZxVi7VQgspVNx\r\nwqxWCy6POhNNlVcGyoFr+yDU6fC5WsCq86A=\r\n=3cOp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_57.0.4-8f351a89.0_1660778329910_0.5243984006223155"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.4-83f9882e.0":{"name":"ipfs-http-client","version":"57.0.4-83f9882e.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.1.8","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.11.2-83f9882e.0","ipfs-core-utils":"^0.15.2-83f9882e.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"368c95b50c87246f0c5b143b79deaa4329d0727a","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.4-83f9882e.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.0/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-PFWjJRw3YNzMhm7sjNPTinWMZcWLmevsGR7o00ac5qbTNX8qR9JsOrUO6fTla4LC7zN2aoSITISI3aKF6Dv2xg==","shasum":"f388d8ce190719659995faf8089fba998126797b","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.4-83f9882e.0.tgz","fileCount":460,"unpackedSize":490957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjwkhzCfwUq7w3axvLodvzPYv6vO/ctF3mUDhKW1W/3AiEAqNzLxhrm3RnptPwXEIZj+yAGxOWAax6MM0EPK6l+vzo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFy9ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrs6Q/7B//P7W6d9mFWR/hpTZlx0DmETf/PoDlCMo2cbbxx5/cnajyL\r\n9Fa6Q+ZnqXSDCxMaa633qD11zmMsOaZ8Qvxpb5Et28lTkIqudIn95l5k1qiO\r\n3KAaOkvArTYafzH2n7iBl11kNCdKsEzyJaxShYRHuw46XyQJA7mQ5LctZXhG\r\nviZOYt/RqdQ5ED8Dd3e3/RuwQrJr1HqV29IiGJ8mcLSHX1LW48Ne1+UDYanS\r\nn9nP9TA7ARtnL/+kb9xsGf0ZVFB3TodmRL6t6OHo8KMtBH901Qq6k3Hgxcqc\r\nH39HXEfGutSxgJNQDAIoDorjfXHlIFOrO1cca/Dp+Zn+3D9CuDJkFC5q9Jmn\r\n7DAwT3z4Kb/GfHhicDkSluexjryogKSDgo+7ypJomYF8yf3dD818NeQb7YG4\r\na36WKwKVUfYWi/SETpwWjMHUj+O6ufJtCic2jqG3CD0IqhmEb1isfsiWdAJc\r\n3F6Kp7tVaNBKULejnoQgCBBow/VURVgLwZoOo0t/EtTgP96ogCceIaLoe4Yf\r\neAuen2itmuGQCBmqPEc3iDTv/ksZOMELi4wTy+GI5ZJyxrWyT0E3KHkY61hn\r\nme3Y/QuB/tYloyTGCdSdlyZ6lyCpC3YACFP8Zun8H9XCwfyQKlExusw2Nurg\r\npYpNEyPaCJTvzttAIwV6okC9wX/r47koleE=\r\n=m/e5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_57.0.4-83f9882e.0_1662463832786_0.519167824162265"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"57.0.4-051da161.0":{"name":"ipfs-http-client","version":"57.0.4-051da161.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.4.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.11.2-051da161.0","ipfs-core-utils":"^0.15.2-051da161.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"262c2c4e56b8de0c602251e9ea0ac3546fd2e28c","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@57.0.4-051da161.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.0/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-aXwc5eTpxPQOt/3VikZ1Hut2qU4J3OLVYTcTi/juUq5OBxL/Y0iN8lZEUSUx0nFPqPA6aVkvx4JQN4Z29gk2MQ==","shasum":"57a5a29870718baf7b743bb27e5ce56211b3c7f9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-57.0.4-051da161.0.tgz","fileCount":460,"unpackedSize":490494,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQ/+/nEMpluKOwSGow9lVZwDpIb2C6LLHcgMmTghAdCAIgKVA//xqzx9NnoLNk1gHLlsCJN24NHcenniqLd7LL+6c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGJS9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTXBAAhTdFsEkPzTVp327nrhzhyoLOrcHfPt0wyw/b44lMfSoNfzym\r\nZVdFw28yyKNRowTZnn7+r5CNbmpaD1aL+yvc0xnBXfj7PCTkxfwBx+335g97\r\n+4Ldn2fMA7MA22ySJP/0TzlH+LcYz2JJMsYWeeh9naOzY7DFkS4CBK12bPaI\r\nEJnE2jO3GwWG1KnyxWemLgMxceRtO/3FoY3v4qnRjxOk8qpijAjf4UMUAE6Q\r\nfZUiwsAR97Fwbi1+K9l+dsgKmzsQ47p+C78/H8w1McSdSzB3e0fWuz52PGgk\r\n7+gXpEY+qhubcz6ak5CzcG3dqlyDWfM0Rgy0U7X8O/vkl66q/Sbm7r3VkQ8g\r\nz4VsHLSdGRkpGcm8pMWqfTyDrNpUQtSu/c1lkUl0pFRvuYndPBGJ0LqTAx++\r\nc//LYHhIOdrcYRBJET+9lLbOQ9u2FDUnBgW/gHspgwkZLV6UqJ8A8ejMxTSd\r\nXQUa5sY1FuRg+m5x7abAQkjApaPqxMgKxdO0u0ZNf+PbuQ/2XQ0ZKfbgG4Le\r\n94SsGWGgk5cyaopZKEtAddZb/LaL95Yw9BAFcaJwjKaT9fc8kmHZ6NGEgEzj\r\nVMd6AKL5KLP7oogYdIQ4BqyVFzqDwxbIpk6t1B34WZo0gkI+47AbkqdwikrF\r\njuIslEZG5Rh1sIZUd9ch1HOe540t0DngQWo=\r\n=1Tx7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_57.0.4-051da161.0_1662555325461_0.23339739251453917"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.0":{"name":"ipfs-http-client","version":"58.0.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.4.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.0","ipfs-core-utils":"^0.16.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"89aeaf8e25320276391653104981e37a73f29de9","_id":"ipfs-http-client@58.0.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.0/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-8HD6wRb+czi6NW8P4n4H84mMefATHf/yWIBFal/DDqriFstrjim0BE5w7lfw7cFoueoH26kq4f70lbF95/ElKA==","shasum":"c9cc72fbc926529eed62bf028d2bb667cd0648f6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.0.tgz","fileCount":460,"unpackedSize":490461,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ98+STSNoNojlIoaMVIujyPHnV9I7dzDgT5NFok+5ZgIhAI//kPmpAPsshOB7ThFvQfD7VVDfcIYNTmyZNAZr69Ba"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGJ6tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwlA//czd51RG7aLod3HJZ8VrGZNLYtmmtecPwrCX0UkdNmAIXztyL\r\n2LN+F112PjdBePgEdkRv+OcoUaN6kskuFqypmvRRs5YB4IXcIW/En207xgfb\r\nWtLC8D3VwSFrZGIrAuStBGQdM2kG/tBCFcMVx1iQlMntC1nfHI9YXFijunpT\r\nVlam9uHcHxpjdsYyLh1zJNIdSJjdMp/21eYIzKZscODW7g8195A8utZOdAlI\r\nltdJXAn/co1/pbDDPGTklzVBWqtGfx9cvJd1UiMUFuDyvnghz3qQ1v0KeHe4\r\nqpisd5QJp2X68lFNrhMNNXzl7G/Fj9+uPcoWI3ibpNSlnywKgkfOnKaZqibf\r\nNWyrPoSE2MS6JG0CuuYSf46LqDd3zUuZLo8Uh9znHv2LP3331x67NgxeAnVr\r\nrn2jY4yIoUAsnoOvWFaEuK3z7fwDj/k+OHxP9W/izjSeV92jdyYvStq/Ypsw\r\nKQ0+gVocQWFjzW2+vJEoioWHKvDrTWCGyZaCJiBgtIOSAowA+aN682fCv8dx\r\n6R1k/nkl8M1w3okh/e35Ga7dxTEMSk+ezmCVJ2xYAgC/UA+jxPb3AMBnoiLe\r\nUtc/kHZ3hhLbITowO0pDZkGz77fKr+RtmpCtyDEFBC6yBLXxhaQ5kq2gGIrS\r\nv8lsleuXtVa6z+qSmP6dg5DCVRVY6i+MKXA=\r\n=K+Kk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.0_1662557869261_0.7591101872547827"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.1-b5456882.0":{"name":"ipfs-http-client","version":"58.0.1-b5456882.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^10.4.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.1-b5456882.0","ipfs-core-utils":"^0.16.1-b5456882.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.0","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"bc139649f4cd3840696282fa6dc6b241b9ea1833","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.1-b5456882.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.1/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-dTJQ3yj0cVOlOJ3IcH/+ETvwzD9dlhXmwROLDqw9GRh74HN77jDjn+bPJ546DW7D5bNtwzLEeC0sBi0wSD183w==","shasum":"8fd8cca239717a9c7260db99f7a8943e0b8ae08d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.1-b5456882.0.tgz","fileCount":460,"unpackedSize":490568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWg69xdyFqOJ2j8UJ4z0nV+zx0GR2o8RCXckxW+b60sgIhAIIVgHJyZmfaSbTQTYKzknelIpwX+pzLDUBU56UK+9Dx"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJEC+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrtyQ//XCtzvb+oQj5c68ZyCNslpL3jCrPARPrlp1PZogdBt+UPkgeX\r\nj4jYTuoo45riIuiS9iQoXY99MKK+aNSXWvejCRGARy1pGvzaoSofgQEwk03h\r\n2ye6wQm07RMJlBs66dKArShFOhVzSqbxLf4tjGiqz+D2rs/EcJVg20L1VNfq\r\nIVhVOlfRcUujkLD6FK3gcP6ZbpKH8CfVVN4v8yqVhP8lBlbaxfm5uS0i9rm4\r\nyMo8I8gDVKYe561V2VyWYh8zNxZkdor0t26JGC7sH/icy9lmOwxG5QAom3yp\r\nDpLzcxC/Dj6Vm7sCFR3jB9hhnabQbvHfnBkvMNDdCFs14zNMLl7V/HXr0rKg\r\npZqDQBEkmLDGOcENRRAxt25pve57hq5sfYHaSu3DuCfPtIQX2y5rxWrlTX1C\r\npukA8mvKfWzbzzMWVQnhTwGfQHWuOMzKfKf5hn9OXhsgEwGMoliIUhcqQzuk\r\nistQTnB8tc5WN8dR8jjiaYHdLL2yhJIg0GuTPq7CrvsIpPHDyvnFJasIWsXA\r\n7RxZ5y58BISuLod2IsyawVNvk3rbPRsZJ8buI70Tkd+O/oM1HpGpAWreDpT3\r\nCiJr+ZDJGPryPsmGxsZn3mMueyEeXlGC8MvvfAPrTnC9e1s8m+5AtYYawMzu\r\nW30vP8cPstlpXtXVdYh3lKtkTzxWXKEnpZI=\r\n=sjJD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.1-b5456882.0_1663320254205_0.04851259751664583"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.1-7c676f63.0":{"name":"ipfs-http-client","version":"58.0.1-7c676f63.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.1-7c676f63.0","ipfs-core-utils":"^0.16.1-7c676f63.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"90802df6c68ef286b155c31dc4f625a9f29ec7a7","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.1-7c676f63.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-GIn9N6ORfJXgj9C7mB4TB6opjnrja6urv2zDGDtSQR0l/80jW1ulJU8lkEuqqm0uuBSN6j9P6KfszFroemoGFQ==","shasum":"abbc61dc1b52337311347867a2d316513712c254","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.1-7c676f63.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBvf0AIRbQbXSUOZA1xnimsi+wK4orwTA7fa849LfdydAiAZpJ90+x0lA4iHGJ8Q3SOTGn+h2fU3ED0Ee9rg0LbaZg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK2MHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVHA/+LFqWNZOlBQuQWeqkaM2bTGsGEQv6Y1zmXFttu1nqD8whRqK0\r\n4tuE/nmt7slW0THV2ODwGJ6uucOpDbfEoSoQjKlTWc+oNzkmHW/xA+FjWbP7\r\nQA42UN0jY7KLIPiTvjpL3fPfcfP0ySjoptDPkdtI/WqGpYGOnyD0duJlCvA0\r\nvnv9Dq4hs/TVpqOSsYikMwPrdYFkR+0mG9FhkTe0k4Xk0fpkG9+10803bnRq\r\nkoKhLxNv/fTPmhcwMdUwH2STSTzCxCa3jkHK69GIfajdmcbMXWZ/PiYD2Yq1\r\nsiSH2WfQQKRfOf4ussOf2uY/Nc3l1MvqnByKdXx6ZCkYMy/6Q75wmo484boi\r\nMNa2L1uyp0xb00cNR0FmvwQiQ61bks/Gm1nNKg71DYlbQUz8tAhGMSMD2YeS\r\nwyT9rPyl2zIYAEFwR8LoneIvTIYlChFZTvfxPfWSTlqg1q3Me1Ibi8fqukai\r\nDAhnVmS5GUb5J17hMxSvPXgs1euhJWjJEUKx/wxtDnV4snxZy3lrp37u08hl\r\nRmtM5Q9RgBVha2QJEWL2GVkdMzywaRO0lk/MN1ZrdvT5pTXRConYxHypQEbw\r\n5vseQKDi9lzU0eesFtheVkiWVjOFHiea+/LEJVweyzDZu0SmLHXIjP/NGMNY\r\n19JG5YfFFlufleokX1Mjxao4MncDEJK1k2s=\r\n=Anvh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.1-7c676f63.0_1663787783129_0.7279166240633055"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.1-2a830bf5.0":{"name":"ipfs-http-client","version":"58.0.1-2a830bf5.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.1-2a830bf5.0","ipfs-core-utils":"^0.16.1-2a830bf5.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"ec3e046a48458e999e557f7adea92e304bd7b0e8","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.1-2a830bf5.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-vQdftThGG+C1/l8nCeQ5LqzQlp/2m7OjNQH3PyJP59WvYksDUxDrMHMnTxPiWpiStGlo3NFI4FwiwfBvx1+QBw==","shasum":"8bcc8f1d71110ebf48c5c77d55ac63d55802f326","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.1-2a830bf5.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNBBHhNqi61nXcaoulf0BUOxdVYAgr26lhgWDbp5tz+AiEA3oMmHXR8hZDIWSUae2R1PB94XTtfLQ3dUYSXR4ss02A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK3npACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqASA//afyJ23H8uYSpvAC4odbp2N3BRHTdV4pSHvbrbBR7D+JqyPNw\r\nmbwb/0Tb4bSY5yg+r2frjg2yQpOtytQaid7GDeMyO2q6QfI9QwEuxEgVcyp2\r\nK05owdW/plIOs/u8mXJtarL/DUp0n5qigH78dTwto86BXvr1BpBLLOBq+xv9\r\nehjqT+myYy6spTkt78Udz6HvN3HHa80PPG5wwkFHLGsfYngtqEOE/PIij8GL\r\nl7VVNPOeoxoAfYuGPB8FqjjwoDYiEW/B5P/ROb9UTgnPhYHCJbQNL0bn1u42\r\nYqvaUnciNbEzdXU7yDBOXcuV46McJmD/Z4iEO5NejG/c39USsR4wIB2LgVZd\r\nAznYSYn4NkGfei1M3THHyxT+JKL2DLWYE6b6ndR1qyri1k453n03MeAk4sLC\r\n1aGoB3qxPhLs9n5e0A78L9/hCpeP4lX7/Iv88MMpNZuXegvj5nm25S6l7ZRJ\r\nbdgq33xJ6Ve8Dx20QxUfvSHoZHBqJxuFtF3Vj/dEyNrO+g9/kGCsUMRkT7rE\r\nRkmUoM6vfv/C2W9UDe0fOE8Ggt7z63JxPR89kF39yAabI31eSAgNs95cKEQJ\r\n01EqDRFgY5DsRRId/8PXXp4CO67jkksAevl6dGwFZZNLymF6xdnNvwDN3dO1\r\nxmVJm0S852fvaaMpOAKF2rOtVfTAdTCLgH8=\r\n=mfrE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.1-2a830bf5.0_1663793641090_0.9898866628956637"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.1-7304a0f4.0":{"name":"ipfs-http-client","version":"58.0.1-7304a0f4.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.1-7304a0f4.0","ipfs-core-utils":"^0.16.1-7304a0f4.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"95735ef611dd7b897d3d939e512b6229757532f3","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.1-7304a0f4.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-9K7pR26X2GyL1oaybnXwJf2RbxjO0rKQIaqLNQeFjZM026ao2J/Y5RnEmVqv2f7yEt0JPaiB9EduPhGDygqjvg==","shasum":"6babdc83bbaecd8f76a0fb51c2f68a11a1ecc71d","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.1-7304a0f4.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDjEamca2uBB6b2hRAgtaihcXbaDMfkA1KY+1rHO73TAIgBfaziA54LyxVWdH0BJeXkaWWJvyAXQ7T7IUy4b63WX8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK3oUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQbg/9Fk1k/64nN8gmP8kgyDdFediVX6aj/FA0BShN0WtW/NmeJfKT\r\nw4n1bOAJyp+0XfV/m5HlRTnxrHFiLWpFhLCModB0xwxbebyQTwt4/IpDeKLw\r\nFih0XZv+Ql0S6Z01bbvYCZAAqWw2DtpmVIyvpbpMBWdEKTJzYoPnPH1zIBnW\r\nRuYySfyexArLYsh1wAZ7yOjjpwB1eBHmwEoQZwhJt0CP2mqEPCwruXEVVnnV\r\nbp21V4E0kF6lv0Xz9U/gprHnNe9tOkxsYecwaKxoe+CFNpR2V5e5V4ZhPuLs\r\nnkMx/bvcYbNcC5Zay1nsnXRYvj6ENVvT8icRe0H2p8SkCXWBON81eAsbsNFo\r\niVcgzWa7AXV/NO85YapMcRSa1u+7XbCG8C/sTVv85GLsNChax2xybh9dzYCY\r\nv3nVxVFqseI9vsDhxXuHhl2y+32tK1cYETrDTm0mRjfHS6LhuTbXhahtAdm1\r\nF+LP1a3JyYRfkeNIOES3EV530R2/0CrjY/0anddRsuc1pc81alnvMId5Dm+c\r\nXEcs8JAUdHFONndDaW4l5+wKIGenNeg0nur6Z4MEzXfU1eHTa3XDCfiiGieo\r\n39Ta77WqyDXaJuXik/9RvkQ8Yze2PKcoaMII6kPpgx8ilbQy5nlX6ScmvFd3\r\nMaVTbBZgxFt40UAuSKY60h/T9eogv9oRqo4=\r\n=gUDW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.1-7304a0f4.0_1663793683869_0.4898509839097578"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.1":{"name":"ipfs-http-client","version":"58.0.1","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.1","ipfs-core-utils":"^0.16.1","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"d1f1e75b2060c5c2e64d133a7a6bbabd2641e5ef","_id":"ipfs-http-client@58.0.1","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-CTl0SDQT8zPevK1fC4fD2UzUbYklwRYct6SomGPexWWlCbI2Bu8ZoSOdqsj3GwkxmUuuCtCGoDK9HkkyNC5QlA==","shasum":"24a6278e03a78d008f104cecb1e4250367cc3f2f","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.1.tgz","fileCount":460,"unpackedSize":490510,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCC27eFhcXahvVfVqWpnP9rCEQQ20nT900xq9kwlqEMBAIgFh5ReeF4zfMC/dDqd0WiOPJrmRb8DlWubPn41edyNXg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjK4gwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpkow//RFU+5KNlgK0MduWSgEJiKAX2bfDF81YZ0bUVXG5ogJVK/4ZQ\r\n6Mh2tcfw5hRl1hJoeL2ec1OIUSSgOZaLowgq8raLIkRuoEjbnZyxUJiiiSm6\r\nknDfu7CXKntqKKrH55AoeZbYsKSW7sEvmrmVsjnDRRdCjyCsTO7xwM57LmTb\r\nvIksNgaCjs0MdGzz/lT71Q9GIi5AGOKBfzgGq8EIuxMk22GpRCIBkqSdyJC4\r\nZbfiT1vkvLHNUFmlLeT3U7ak0Xw/pCSox38Gokid7fF7SyR6eTbXFQGlPqaa\r\n6dtp1NMsdSTDOZUmFRRFslWNPZFRsYJt+3RVHQJfA8Ju3+SnIkHTbl+klEte\r\nAY+ETaFUGEcbwlfrPNoXKHKSI0bif9FaNwXOhnWtccYNqMf96TknNvVQoAs4\r\nQRMj46dKSjpTEm2AIitHfMWGe4tJ69UrHmV4Hfjtep8+U1hrqYytec/AFXDB\r\nEx29TCu3EPwwvMk8eT563MtSqApaO+eNtpJcZ9OMqUI6Ji2oTRlxIPgnVnYC\r\nioUZa46rl+TV13Z9ub+/GLNqUTkx++urCyuluJ6kkzSmmdfuNCw9xctFK54B\r\n/wTL5R0vrnyOEmx4K9jnrdi31aGaJP0VyVqS0tejEpuVVcR5gXiTU9FhUGix\r\nJdN/nbWhuZduRn+SDlIE1zkaZJF5mbIbG1s=\r\n=qjZy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.1_1663797296567_0.17939227702749005"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.2-d75e0a39.0":{"name":"ipfs-http-client","version":"58.0.2-d75e0a39.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.2-d75e0a39.0","ipfs-core-utils":"^0.16.2-d75e0a39.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"4233393ebc1f8526290235c1b52f4d459ff96e1b","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.2-d75e0a39.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-GTTuNU06zp9Z7xKJpVEuIAK4J5KZ8pgKIKG1yEsytlQrWzh6pR108LpBqT1qrFPoFU0qkR+byXkq92m5Zb/flg==","shasum":"87bc7eda03cafc848b72fad11b41461a70d1b94c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.2-d75e0a39.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3gP/OQCdvtLTXs9/xmFl4od5DQAxePTHvC3lxBFJpYAiEAynffM1Mox4FZWN/GnqLBmG6Tn9cfDLrHpRnKhKZBSVQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLCI4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnhA/9EQxYa+QCqrFUPbd0QcsPwZX4nm3FqoV7lCOaZ4ThIBzHW51n\r\nPp1eXo4jOvqTRL0nPHsEcVKfpe19wrCmuQsUd1aG5WgQIkruA6WFSBKlDRDm\r\nnHr7y9n1IU+E0bVfyPqtyKw6S5bmF+oQKaygtr5NHEU4qyeNW4pRfoY23Aim\r\n1MSIO5eW1KKelZBDgJraEKnuM8eUyOMNeYK5buxJ9Lh1h+5r82Hn9Hqn37G0\r\nN5vY2GLco6vLlUHrOxZzp5MqySfsLO5F4lboqdByMpNu2hl1uvFPATnbKDdL\r\nyZQKM+ijiOrr8Mw5sBJ8l9LZw0UPyP6j4FSZnotDPrIri/eU6POK9rmnLPKh\r\n+Zo2MMxcKaHBNenl0b0hqxZbvGYOUxARWDoDhjb0PnFXcu+mEa9wkEllibS5\r\nIMstySiZmYF+clxL6+NKf9AqppNIwypYQWCA06aVoMp4/IqkZU0F+w1Drcf6\r\nlWvIFnId2nv+DAqQayFnbxsa94Y7qFZbcEf1UI7vxTJgrL2/2TOO23EHwRci\r\njy8CTssdlFH//6EYlEYSNfDo5dqf7ExLoDEu6KAApkE5x9jHxR60a+7il5zb\r\nMZ7KRyILgnmWOrVCXLk4S/S6Xm3EY6SlPsmcIN9vWub2FWTVB8G0t/S4PvkW\r\nZTrlufprNj5nNuQkGpULpGFTtDAxAj7gEi0=\r\n=1x/m\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.2-d75e0a39.0_1663836728679_0.8234925531604533"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.2-d1b0a8a7.0":{"name":"ipfs-http-client","version":"58.0.2-d1b0a8a7.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.2-d1b0a8a7.0","ipfs-core-utils":"^0.16.2-d1b0a8a7.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"de2a2b2cb3fb26e858af2319c63296a1ca411c25","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.2-d1b0a8a7.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-5126JP7g4DTAi516u7TmAeXiVKvk3/aktOvmjv4nkyQioa3ZPHbyuiUOlcNI/O+phQdXoLdJQV+tMeS2eaygeA==","shasum":"4e85cddee1348180ae14de89b2ecbd65644bcf79","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.2-d1b0a8a7.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKuXL40tJ8Wwl4s3zGfoVBMw6/xFK8TfWX6z+xvcY6eAiEAqAFOHnloD1fDJK5BZIuQedZ5OkZP/9/LudyyvsfB4CA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLDvpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgwA//eMcLQv3SDctwlC1ro9iknZHdpSpWvX98Y9lvefKt4bV4F+XA\r\nFfhDL5eNco+GmhRHVmb6prhJDg6aFCMpsdzcr63pC1NmQeCvCOEDmmHtSssm\r\nFL0nBaN3D6VOD2Z6e2VSO9TyZtTwuJyf5C0fR3MJlbT4YvA4BVkLS7OodaQ8\r\nVFXU/zDkgd4TJU9f0JOaVFv60pN6tJHorTjTEkFiL+v6hKSM56+gXWCuku+x\r\nUpkZGZjmDH625PIk+va+kcM0uGaV9sj4PykR15oLcsamEs2mnxc2ig8RnJpD\r\nWdLSmbmgaDoD0C2nzk/KdJ9htElzDKPpJtXNQRAj6RN+7d14hOFxeQKUTArb\r\nrfr3i+clzqmVHuM8t4TKP0OTN479hIoy5/jGR2WSgycaRRDWxmqlrJKiC/0O\r\n9Ai1T6DhbduinCYQ82kuZt1AfyvgnNKV1XjYCDPHP7ltMJtQJNtGnJ2pJ1hs\r\nXWnSgLa8ycoqk6YbDT/mVGR+xe2hiHLa6rql80Qe/ibxJ9Vi9AN2C+iB/yHP\r\nZF2KcbLUQVCCJea9dPhx5RUlDBZh+laUnJ6eRd9f3uXP2mutprwudU6aPfMS\r\nEU86m1vjvFOXn2G0H2XfdB5l/jB3dG7tTBJLfGsHzw+IRfEDQWkR1GIUqYtK\r\nH6CDfCQj5Y1jt2yOy3zMcmeLqq+uO4Lwmd8=\r\n=Q6Gl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.2-d1b0a8a7.0_1663843305075_0.8992436799603811"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.2-acbc1c62.0":{"name":"ipfs-http-client","version":"58.0.2-acbc1c62.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.2-acbc1c62.0","ipfs-core-utils":"^0.16.2-acbc1c62.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"60666473159284a7bf9067d10436033caafeef5c","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.2-acbc1c62.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-yizt9unOHhIdcRyy4xgxWvzmihKLOUkp0itMiA8yYyliu1sguVbr4VggCy8r9+/alnrzyFzQIIHhfsS9UyzSUA==","shasum":"db9fbec5450d1c8844ad050092963d9805b308af","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.2-acbc1c62.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKEWIQnz898p+8DPDi3qWNqFhPIOIo5jb5A7T+u1gG4AiEAkCvUmHJuZS+YucQG8eKTQExohVlibA/T1TFTaiZeaHs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLFxHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQ3w/9HNGy2ygqpK/zfNieQOXLshTcvzQaXC2k8aAPQN++PkBcb8t/\r\nW/BrNiQ9QOQii2r0LaW+GTSAJGpnj5PmdOX0bQ0sWdBB1vEou2j7VfAg3qBv\r\nSMnJTyM7Z3mrOZaLIfjuhf+cvbd2pC3mkL4JY8DpYkzMIa5DhZp8S/wvz0QQ\r\nx77n19t1Uk8ebDfmedxv9goXfnZODt8hJskuuMUo1KEHw4Im2PeViNItnmYE\r\njvA/WKyj7lh9qaBoWwi6KoW5ABJSwvaAu8rpatHMjFzgAzpncZzPBH89WqJG\r\nAeEyNx9FZsFL/EeinAsNFOQxErLdpNAyknt+kjOd8zaf7d0FXrSXkkIlxKpD\r\nLGbuvQzPCwdrKZZA+vyLtqQBASdUlD3KCb8WJtVGmXLigVvG2OS+5CkVqF4r\r\nW4uBqUb/OIqoThmCBNtaDT8ahCAtSCnVNVtg44IZfkPkcxlLq6zEu5mPOgrg\r\n7fWmLRUZ6v7lV2fsicW5VhghH85L7zmS/eFKUNCFpbs0TdqVuMCa+kK3Ga9V\r\neyugR3nvryYqdQxlvmWpI/ub5fdrsK+0YmZj3dXA4NHSDzgUQCDE+DEN8rb0\r\nJiQLS18IrmZjUfmvKQp2lugmdNhOpQBL3SAZFMuj7u2TGA6UmhmyJrrujYnL\r\nnUge/GF5olofJz2ZsHQKg6owyED+0WL5Q58=\r\n=O2TS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.2-acbc1c62.0_1663851591415_0.1763134378245732"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.2-dfc43d4e.0":{"name":"ipfs-http-client","version":"58.0.2-dfc43d4e.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^7.0.0","@ipld/dag-json":"^8.0.1","@ipld/dag-pb":"^2.1.3","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^2.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.2-dfc43d4e.0","ipfs-core-utils":"^0.16.2-dfc43d4e.0","ipfs-utils":"^9.0.6","it-first":"^1.0.6","it-last":"^1.0.4","merge-options":"^3.0.4","multiformats":"^9.5.1","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^3.0.0"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.1","ipfsd-ctl":"^12.0.3","it-all":"^1.0.4","it-first":"^1.0.4","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"4eac92ae987d3ba6007c4742456913c865a06857","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.2-dfc43d4e.0","_nodeVersion":"16.17.0","_npmVersion":"lerna/5.5.2/node@v16.17.0+x64 (linux)","dist":{"integrity":"sha512-JN88uLWNRwrIytERHVNg27WmcuNVrXG40ckaaEjzIS+0fM9fLeSIKUbxAiGyH1s4sgv4fhKPm/GDIP7kM2FMDw==","shasum":"895ed660cf50937a6e13dc9a04c8073785ee86a5","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.2-dfc43d4e.0.tgz","fileCount":460,"unpackedSize":490543,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWGeOOF+fIrFxHjZu3QfxRbueBmHTgVraHqAxcVYen1gIhAI4eeDsvZwLoAoP4RzxGyzFInLa2cppDFILd3C53rjVX"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMbUiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcYBAAiOqVUU2qRJV3AdgdlVHFDN72hG3lZB1iaSUz2UPImLHa32RN\r\netenEDccHou8eCjm3YND3EzXG59qTIUCRp/CpVzVxaHTJT07skw7op5c3vMH\r\nDm0Nftfy188zEfidDLmXPnPT811nzgUp19p5QyWDDCUHS9YCmeDmVbKxOsVs\r\noMCMsnKQs7JHyH+OALptj4MWcdytJ6RTXQsHzIGTZ8ngK0s/haDqEz/wzaSP\r\nzByR9IUEfJjx5OKtW5QWP3DA//s4AJ+wiAeVytXD3yU60AWFj7pZj3J0Rrch\r\nqKl7CkiUQv4D3hYSnntFHkV1p9TVmAUC5DpLeiTlTYSNu56rhlUNn/4qAjZH\r\nbALSDY4X1Kl49uLyULVgg1AtegcnQRe3hCcKqz4lK6VrEOnkLrZ4W5fhRMWy\r\nIj8t4ziTGPbN84DT3vmXexd2ONoQjwivzMCj9p2tZXgI66sRqU/lE04m9SxB\r\nJijg/+o1VgK+uW9cNesYd3sWlYQ+GBDQYM016AwGK0uZKR1DKzndE9a3FsMx\r\n3r+JZUZMFRjgg5KdpP1W30OI800H7cA0nIakiUubTalqh2fp+V4FT/7F63wu\r\ngmP0RNtUaX6l+63flz0OZzNYqVwivvYZAI6NDlfjVwfESmfsuO5XWFBA2nga\r\n3qaURYzp+ipLgtz6xI3ciis6Oh61y1sbx/s=\r\n=ZVRA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.2-dfc43d4e.0_1664202018168_0.8236399612589251"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"58.0.2-0cee4a4c.0":{"name":"ipfs-http-client","version":"58.0.2-0cee4a4c.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","@ipld/dag-json":"^9.0.0","@ipld/dag-pb":"^3.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.12.2-0cee4a4c.0","ipfs-core-utils":"^0.16.2-0cee4a4c.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^10.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"b44ea59fdb45d3e8532d6a2d5f670e2df46d36ef","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@58.0.2-0cee4a4c.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-xFNeyrJQBZ74xsjSErwbUWExZA0nP09qIdupCUs6Zhdvk6OuL2+i3kcVFk3UQOOTNnS2x5OqP98yOmueJNu1oA==","shasum":"6444d260ab63f6921423ad20e46fd3602524c4dc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-58.0.2-0cee4a4c.0.tgz","fileCount":460,"unpackedSize":494768,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeCaTat/OwBfvlBPEpZZi6cMWRwE1vub5OpEaBZgF0kQIgZ/hxH8qkLNgeNh4mZD7ZTMpsIK/wlNQ3Ca4vsU/BX7A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVlc0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphAxAAk07A/e7K+H0GMR46VP0q2GXjzWOVLMIV6Tas6cUI7h6c5Tvi\r\nIMCpzHyelkWkUxCOFqBt2wgMRolLRXVKYpgbXaZMgg4NmBAcR3QeUacRKxdp\r\nj3E0h6paSa3jY1FQQJCwZ52Oe3l5ctoOmFFGQf4oL2RFzg/eKR6ipu3LVkoi\r\n20dpK622gsET6Eca8LQ4tnqQNRyRBlocRxHLLQ9mFM0nL6qYgjWnJAac6Pqr\r\nW44SlbVUgDmAsJkizeULCE/jYoEhajH1I74WRcVdove1B0I790qlnOyhC/8Y\r\nXpVwvvKiTyt7jk5t8rpq15DKD8Q61UNJnhsEQ/1iHRkWzfSlhXD9xrFRSDLd\r\nhDRuWCSJoRSJvmImFubcHT4+mgBoB3ChwTw3bocDSeCeaQJIKGRmcZEPm6S4\r\n+wJWosGZYEXafDHKrkGMMJtUK9h1jrejk2K29jE4yjY0R1snF8IM5BuYilKI\r\n68vjMsXw0Ym2WS1JsRKSbGxRGISegq7JvBvK1yL7i7OBSNHBLClNR1BggcWr\r\nRsKlui6xoeAoQvNHJAHBlb1BoPeEe3aVrwtzp02NAOI5zgVWpjqYkcQ3zFi5\r\ni5+HMT7P5AKSRterd7vA1R9/oSj3n1wZlWBR59gcVzHv/zTPt4vzQwbYafFE\r\n9cReyFiYH8XPzoWu/JnTzIEb+ef6Nz10XZQ=\r\n=snft\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_58.0.2-0cee4a4c.0_1666602804311_0.40159524371251965"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.0":{"name":"ipfs-http-client","version":"59.0.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","@ipld/dag-json":"^9.0.0","@ipld/dag-pb":"^3.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.13.0","ipfs-core-utils":"^0.17.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^10.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"e8b7b66bfa98c2a1c0d0bfc19f698d7d00b6c888","_id":"ipfs-http-client@59.0.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-cFMU8ykKgxK2/uAw4Hthy2Kd+UuoFBno89DOdUqHYvmilKrmfV5vrYwviVWLYveIpkkaj8FB5x4TBxsiU99y0Q==","shasum":"66bc208d6bcbaaf238c054b3c0c0beffa2774190","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.0.tgz","fileCount":460,"unpackedSize":494735,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExRDV+Wf7pZKncUf6jgq1O3mTEwqI3f9bcF6mzXOzSRAiBOicPp2WEy71gEumU33ePycjyng4CLESpQl6g1eUQBNA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVm0+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEeg//c18fdklVzLT8mSij5YrO3pTYaYBXYWFbikst/AjK/Y9qp3zg\r\nGEBw1ET9KQRXjWOVVy2duzN7Za507DIpBy1+pHbrZSy7O9rmHEvlREzpDo3J\r\nj8XCFweqGnCt3bbAO7VzN+5y9seVvFswj1lDxTx6YJTqWQdF6730DIsN4F+m\r\n1ePY8mv9/kiyFagpFsvnXcUykaNMiKii2jlcq3N+ISbCbz5lvCJO7kMgUJ8q\r\nHeIeHRev4Rkq6A4VhhJvgTCRmg1mkbdzzQ0ZoMZcUePEBJKuDDXxBsonLHCp\r\nqrwkFc2VJp/dK9NHjVr6zyGV1teeC+1zuu7TT+ueRB3g6qmCgLf5BVBrsEDh\r\n5YUth5FgTsACMihSS9QkKoIuahqYhzZHrXy3nVR5btOLwVa+GfxUuvG3NajQ\r\n9JhhVi9Bqj2eWThtEs71Lbsp0IZJ2Cg866ZXqZ5g3Z95Kw+eNLf+EFkhGCIy\r\n5RrskBtchDAP+3A9uWE8CafmRPlRzXcvZElGLvff4Vp7oikAa1czcBiK2xTG\r\nlSQoG2L3sdXxJajmM7g7HJR8MDAQ77H3mq7et6tdMeXyvYRSihVn4wIwhs3X\r\nl2cLyqia8PlDOQExr9PhfTD6ch5IqgGERMMueb/l9kGw8iKF8PfwekuCeWFb\r\nFOjTfuh3xcz6Yq1peSyRTB3JxpOr+z7fs84=\r\n=1DUi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.0_1666608446159_0.431123773389273"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.1-a77e40cc.0":{"name":"ipfs-http-client","version":"59.0.1-a77e40cc.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","@ipld/dag-json":"^9.0.0","@ipld/dag-pb":"^3.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.13.1-a77e40cc.0","ipfs-core-utils":"^0.17.1-a77e40cc.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^10.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"a614528c55b8b22866bbdd2ffcde2e38eb5f578f","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@59.0.1-a77e40cc.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-gVMlKky4L4R5/ax7MQh13UQZtMNNtjs8z72oM6sWKOOFlqd7YaGYSoZA7hFutSvnW4onCbU26oxBr4hCDskO3g==","shasum":"a8d156a55ce75145d51efcef856c93fb59cca657","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.1-a77e40cc.0.tgz","fileCount":460,"unpackedSize":494768,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvhVK7jZrqkHcGYeID7iKtRrEMqV0uSFcHaWTPi/8eIAIgGSHnpIJxhh+G5zxjaKIEnpxQElbwqU5CrcFGiGeCD6k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV4wcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqO3xAAjm7quRKXkTaU5/SDvHR8drSa9IPggQOiFfBs8VP7SyAo2qb+\r\nFSyom+BtzTQfsihwIZDurqj0GghURJmuL7ZZ8K3wZeBUlLxn0SUkod/6+kHL\r\nU/G5wL4+IV5ZpXN4yImNXHRXoKRXXfLzPjjNt8gH8ckmGhIofCB/YsFF8xAp\r\n6hCOlPHmFaIteGdo5xsGSxMiy9P/5Jh0unF7aadRUbTchde2WXvoBKHpqW/L\r\nY5BPebMpDGMpCCi2OGLhwbv3UL5DFgvyor9QvJsVFXG3de6HMxKDMkKbcZC9\r\nfrcaFzNtkfZhUNGLmcmXtUHt1nU+VlrGz3zPiKvjinw8/4JPXek0XPOMRf+p\r\nHnbT3Dg24lI3C3YBCkfKsllCmt6wg9NUT8Y/ORue3l5YFQWA3MIF5VDAv1db\r\neZalJXBrfrMoC/VnUlxcZDWH1L1J38dpAStsHN0S3V4aV2Qj6SFnu+ebFY4k\r\ntBXdVvVlzUiAK+qhhRUP/CleLxubEZobxChZb0Vmjy2ib5jh06nOyYd5iJfy\r\nbnGEqyiIOgeC+tl0IUearn++hEYMRESPoQEfRbBlQ40krCl7ztzfrKXrQTLX\r\nhOMCn5HuxM4mk7kIAzKZtpU38CgNac4iKJJSJzSNDUbNQQ5nnuahjIcxFZbw\r\n4ftXPorXMkxd2qwYFeBe3EPP45D5x2nt0LY=\r\n=p8Nx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.1-a77e40cc.0_1666681884146_0.2723539762927669"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.1-58e6f468.0":{"name":"ipfs-http-client","version":"59.0.1-58e6f468.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","@ipld/dag-json":"^9.0.0","@ipld/dag-pb":"^3.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.13.1-58e6f468.0","ipfs-core-utils":"^0.17.1-58e6f468.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^10.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"2a13d94cabf2e6ca2f631dc9686f03de6aa42447","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@59.0.1-58e6f468.0","_nodeVersion":"16.17.1","_npmVersion":"lerna/6.0.1/node@v16.17.1+x64 (linux)","dist":{"integrity":"sha512-AbosHutYYcEb3Ni8TeTn3lb6+MF4lXH3+hcY4Pu/hVhxgBRNrnLoWd9y+vTyPSggJE98d87PScmr8r2GVb+zTA==","shasum":"b03c5db2f04d2ab74f9f1936ac4348df12175915","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.1-58e6f468.0.tgz","fileCount":460,"unpackedSize":494768,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDN4RokVaEilsV9mELL1Wif7EeYNJJ2Lbg2Wu5NYgitogIhANy76uojJCEWxbi+Fwsy0DY2+uS4K9+nu2c9BRD+Bvq0"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV5ssACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+PQ//VuRgeoja/c5VNXyzCBqIsghU2kUDQ3/nfYCUbbjWD6YN9JOU\r\nE12gK/Sa1mP3dMEA4kkFwQ49O9g0bDo4oF3Ne1pfUJxVoZdepWYj4j1pcosY\r\nwYtAiJQl+sHbwSkRnrBfFnL3d9DWRI9n3gmK6suL7PbeNLYrhOuShkbpveFS\r\nfDUMNQlolv9hxXp+Tm+fBEGUxipmYosiomrP7AwYC45HceMxM22aoJGsX/rM\r\n0un1N233l2wyprV1rSH1QUqElS1z5qcFcE8R5LbeudVPBQGTehqR2Dkssk8C\r\nYBpmfNNF9fBby1vNl6iwsB/9rkUJXZ29wZShK217x+sPyg7vxUOB45MngTl1\r\nE+iMStYzYl/Ztn8CHP9OYjaWtJTt74g/IItRHJJjbTjN/TiEluiXPtd4j+/b\r\n5NZYJ0d9oBUz+u7PZuTXZHqeK9AZSj76SnINxr5WGa/El1gyozYWZgVHsKhj\r\n4E00p7dXXEfFZjBo1pNqmiW5TWh29Uqa03fJLqCTdVCsdJ5DoFPexZ6PEiLF\r\n11Xw7AYRDBTjfG9uzpbw72Zp/eURvrxy5q4N4l62kPUMmyjVItJuHA5OGTRH\r\nGoB/s2Bt/8eL3FGWGZ6Nfmc3FxtwLiZU4m9wewuVcZ9acUSEIxfvIPBgtHyD\r\nDn2AEcB+AkS3CLa2ayAc/b/VMMXfsd/RQYo=\r\n=h7zC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.1-58e6f468.0_1666685739856_0.8703561269033033"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.1-6ae5eb7d.0":{"name":"ipfs-http-client","version":"59.0.1-6ae5eb7d.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","@ipld/dag-json":"^9.0.0","@ipld/dag-pb":"^3.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.13.1-6ae5eb7d.0","ipfs-core-utils":"^0.17.1-6ae5eb7d.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^10.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"848f64d53ffe001cdf63310c06e8f0ffe485278f","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@59.0.1-6ae5eb7d.0","_nodeVersion":"18.12.0","_npmVersion":"lerna/6.0.1/node@v18.12.0+x64 (linux)","dist":{"integrity":"sha512-7QxGdIkK/L2kKML9vLD9ya28KwQ+Eis43Oimv4d13iEjw5iJJlfbciwUlium9FAREPFp1qZOwCc5RPYLuT7+Qw==","shasum":"0aef99cb97332c671765d6be979d352e4e71fb79","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.1-6ae5eb7d.0.tgz","fileCount":460,"unpackedSize":494768,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXD2cEQ/oJwtG3q9gjyzlGGiE+JZBfilhgHT4p0rYztAiEAkL0BSC0LyJDqY88f3hz/d04OzC0dERVtD/LIR34NGOs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW4TsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSNQ/7BcbhWzE/HwedJ4wwiiD64421pdprcNkzxo8ckH8rQZXMqxyo\r\nYW6fByIKg5Jggo8F1A/X+50Wgp+urvNFzkUKT9IA18+rWRhX7POm+paIgo0d\r\nb5R7/U3SLqOaFPlJGGmfO+o80R6hxXBhticpB1OBpy98MRANKPnlX4dO0WHN\r\nZ1IfhxVDv8M6U4hT9Vt/jm9esSyAS3cRAzgy3WExHhIEzfBGXZ92WYmiHEO2\r\noL3wiBJtH3eGtazHVACFHzfuFdtH6ScqmwE6sudDKwFBT3n0udXfVMALMSrI\r\nD6tyfVti9wSIXa6GH+zx4AwxVlW254mkYY0kiFCgRaZHBRYd0Ep9B9aJKeGN\r\nd0QDgD2KxWm8TviGRPUmoSltxSIHBxEBzsG0D1Vmgxqqb2EfQu3IegWctZtl\r\n0zwGamv0g79MVF1NWluU/jS5VT+6tBNYT1yZjndlIs05EniqZWU99SJiUUER\r\nw1nqorfF4n23Ofh++rEh6zYfLcMjyFDYXiN2ZYWEXSZmHC7MyxCf4zU0wv5k\r\nCTmiXowIwwfDmZIAGBBfLDWbUFikPQ2PmgUmTwDg1UdxeA9WwIkqq+6Hapdm\r\nP4ChjMJwRdvi9MVIJRHUMEXSgSBNuhTOqIGhFaXiPaBRS1WkL2d/yCl0IzLm\r\npqLfatBlFkNqiQX60tsrsuer7ijD54Pisk8=\r\n=eOsw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.1-6ae5eb7d.0_1666942187883_0.44912278196732336"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.1-6be59068.0":{"name":"ipfs-http-client","version":"59.0.1-6be59068.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","@ipld/dag-json":"^9.0.0","@ipld/dag-pb":"^3.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^1.1.10","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.13.1-6be59068.0","ipfs-core-utils":"^0.17.1-6be59068.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^10.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.0.11","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"81311d5fcc6a5512ed3414aa592bdc9e6c481b03","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@59.0.1-6be59068.0","_nodeVersion":"18.12.0","_npmVersion":"lerna/6.0.3/node@v18.12.0+x64 (linux)","dist":{"integrity":"sha512-V1BFj3BC7cawQJhLknbeRyaNQ6EnBrnIxYCkP0eBYLEVQ5q9mPRMdI3ZuvmQlG5DMw+YeRCpAcabJVslSt/VuA==","shasum":"8def343ad657dbd819d82fb46c96300178b3bfad","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.1-6be59068.0.tgz","fileCount":460,"unpackedSize":494492,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADsaaL0CpEu9O4EaRyk2m8VID4vahf/zj2KEfPRZa0FAiAVYfE4Dx1p//t+yjPouceKLBOGElRxcaV83wba4SOK2w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdo/oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVRw//bYjaxVMbjC2VmIUoBQRN2NGV56FEfKeX0ijKachPhvXjSebF\r\nQVNbOBiZJiChfAIXPUe+E+OLaOVLuaoTD20GwJYmM6z1Fqpd7m5b2uXFgrou\r\ngFKMf09g/Ag6OeX12kKWLkUHec+qFUB2xpTumB0UG8SX6P+qOOtK6UZ7pPlt\r\nD/SsFKenK2NE8LcTnxXCUIlyTSGjEUYkz/MzEFOi9R8Ij4qrZV4+jBFeV6q8\r\nOrpkK6/ZrnUeYIDWvlsQSiQRsuTEuCAPkph3fL+609E0Yaylj33Bj3TSu0IL\r\nguKf3I2Cjo/UDR8JW9FDMedobMuu+a3nRC7/DOSnVfYUIwmV2EQpzeHQ/cFO\r\nQ6Upk75MSCo8Wr1y7vHnMLkWQ8gwE2dVMSuaZOIl3+O4rVaTBrXjGF4kKfJF\r\n4UExy7BOqVH4X9imHUOczSUHdjRsQ/m22cLu7p86r+P/dvMM+AGgTEID06jn\r\nMohVdTwSHzoDJwzJQAxnbnBupBrSAA1hT8NReerEG3FU9l4rUh4+8A3dvMYx\r\nmCsWgs9cKKFEobmit0ONOyzqngn+lwfuQTsDqZNwGzy2uuHVO7YwhdfyUQM1\r\ntyoYV5CoS+oRGndKDyVpa2gmjdLyFDwyv0iuXQi4k9vlU07UYBF4JH6I6D1l\r\nsIByF7dGo9DsaJMQHs0mupWZ/a5Z98qzasA=\r\n=z1ft\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.1-6be59068.0_1668714472124_0.28066439814658817"},"_hasShrinkwrap":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-http-client","version":"0.0.1-563806f1.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.0.1-563806f1.0","ipfs-core-utils":"^0.0.1-563806f1.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.9.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"19b0474216e0a7dd7363dcd6733379790b68a1f4","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@0.0.1-563806f1.0","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.4.0/node@v18.12.1+x64 (linux)","dist":{"integrity":"sha512-rXFgyjXjOZC07wK79h6fBMxU3aBJzO8OwrlXkbHFGy4XfeIoGGZ7k54pai+HNQssdoSSuRyoLNGdOYU2MKITRg==","shasum":"9f30eed758ad24e96791e2bf6456cba11ee35f00","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-0.0.1-563806f1.0.tgz","fileCount":460,"unpackedSize":517509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtm0bGrulKAh7RvRAHpeHrm6hbqvqggXRAqW7oIr/HwwIgCwXU1MOlMnN7YwbQETfhmgz3NHzZ5IXj37KVL2BmGbw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvFi8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7CA//bmbL/pJnTCcRn0QDvM7bdp64VXK4qw9cGupp9ULh9VYHRRBK\r\n6gAspTtFw5KTzu9hcC+j9TvmSxQkTs1jCafy+GRymKd2XJDQ2OpN08jlkzzQ\r\nfToEr9WKGwjG0cvYpgFA3TXw/aNe8Y6ndPlUddy37b5BuKvh4c+1kLTARybC\r\nzuQqFERugTaIntV+r7kmAVGGSye2FhWgcx9Ot8lZqkGFd3kT3sd0ijGwq7Js\r\nu/eWdyr2xoumPQZwnHZ4dfRKuFmlsrLxcFxSpW7rJda94ekR5WZc6iQK2tJI\r\nsFyAbns258CI0Vo3UoPaElGCQ9zRumOfc14E7L4Aq6Qv6WeLxpsFCKCzoxev\r\n4EwXepajS3hzvK9oobBct8hxlGnquVsJ15jy09KYg19MLttYJVyAttO+h8dl\r\ntnSaw12rumSy3ZWB8/pvwCVPsp+vHv0iOh+jFZYPSYtOZJTKpiBD63BatWo/\r\nm6qDpGU4jgmIpI9MF9xoXoX01o1WcB9Tj7HMLeRwRK1kgKLlBSpsibTCnho7\r\nd8W8mg/7h2tKIPNUYMPbn/r9wxY1k0xNJCl2OK3P1+zf+KshW0qqryaSYU3u\r\nweDonL2S0BpX0mPkVnMpak6bZTInqci1JDwW7IIeupYZFCnrwBCyYHveuTZ1\r\nzkl9WKpipx3U1eYBEsRDqnNeaz50Dzqx+DA=\r\n=3TcU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_0.0.1-563806f1.0_1673287867821_0.21385406207408253"},"_hasShrinkwrap":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-http-client","version":"0.0.1-e85e5b6e.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.0.1-e85e5b6e.0","ipfs-core-utils":"^0.0.1-e85e5b6e.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.9.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"5d268429a92d15e22b1cbf7fafadca662b131420","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@0.0.1-e85e5b6e.0","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.4.0/node@v18.12.1+x64 (linux)","dist":{"integrity":"sha512-iAn8on3pRIDEW3pWZ9esZgpBOovSDllLcr118wj9anWFIjsOPkr94LVR/W8yY7lcnibvRjkANr5wS5kqe4y8SQ==","shasum":"4fd383c633f2863da7855d043b71ec86db4f4a14","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-0.0.1-e85e5b6e.0.tgz","fileCount":460,"unpackedSize":517509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5fiUpshXcT9K7GvV+D981CMiFa7zsREJzC94Rjo2RPQIhAJNhTxfQQly4TPRDLEU7iobso/sq72k3pbemGHGJHMF9"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvGfyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyahAAgC5nf6GLDmjZeIUIjpSf26D7ozhKhl03h/2mkYk9a5JqjE21\r\nQHp9/il2i4TzyRhl5a9oAf30+/fFXiCidpitLe84ai2mqqymHNzNUZhP1wzz\r\ntTDF4Ls3Zi0u2tgkBzSQqFZtVku4eCjM2eIbKivbDboAOR8rrETgQgEQHJRm\r\nqhYpf+SXz454AKxSZ6qlM7PVMZGp3sa/6clxytXwakE+euo8tEQJWDhkxrQD\r\nHX+lO7/FEc+FS74PmlhcygL0e2IlKKTPkIXrWMeB6BAnDh+hntjdC/LCGFvv\r\nvwJxkIpKctL6OtMmCsQ0nSm8d8cCI7WBaBJU/I4pZ+EZePz9pqmABbUTU8FT\r\nYhg4kb13BcVNCbf5CxoRfvNRt5/8n0420U0rtkUjJkJuh3UcHKJT8IIYd0xK\r\nEcLmeD8ikJEhHp8sztB+BmMhKWhCZ7smEGBGfSoykbP47mLXihrOCouWjvG0\r\nrkyEoQ/LYn3rHnFH1a1uucI8n37XaWMfsP/UyiMN1ZwUv4Rjxs5syPkYfXbS\r\nNPgXvbftrBltMwwKhfUDgya6djgK0HmjetHIoEm5QR0nBs8EAjXMczNsItNC\r\ne+fls2AFtU6A9ToH6SQRUJ0Jr6Zb8ObI4yHfn9fwx7ntSqXFBny25xqdSgZP\r\nPlur2nDM/sj6Slbv597JKwsf8mEENxF8CcE=\r\n=2iVO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_0.0.1-e85e5b6e.0_1673291762523_0.25692805963644894"},"_hasShrinkwrap":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-http-client","version":"0.0.1-2a6fede5.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"^0.0.1-2a6fede5.0","ipfs-core-utils":"^0.0.1-2a6fede5.0","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.9.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"12b210560953c0358e012a120d162b5f3f32d06c","readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","_id":"ipfs-http-client@0.0.1-2a6fede5.0","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.4.0/node@v18.12.1+x64 (linux)","dist":{"integrity":"sha512-aKjp3zBcdcCptChuTdbD2suIF6nC820Fn7wCLfaI3/FYQbtZ1zED4GSRdtSBrHCCihpf3U2GrzOOJFpV94uaFg==","shasum":"cb007789e8acb69335013bcbf8e878bd378a7fdb","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-0.0.1-2a6fede5.0.tgz","fileCount":460,"unpackedSize":517509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+paEI+AEfmQ5cce+Jwk7MVlrDXPUY7bqszrIFTZf8QQIhANL64pfA4C6icnqN5SzuEjTKMmtSuX41QEh2y/ZCx8QS"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvTF2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoP/g/+Pf+dC/7uVNCyu/bju+0nkfo7Dq6WDh4VI7pLsuTrQ+a9rOk6\r\n9Gy1+IOro/gom2K7WE98CRiwQMeukuV25wp4GOJAgv3qMXtQfb0NoGVMJvMz\r\nuxUSks4rmvS8RpUTgBdZ/AmymhTx/T/TOumxKSpbA/eicBVv2atdLyEPPwga\r\nzmYC4Xv6h4suH0yyGWoiCAhq9aQCmoIqOlg8FiUUeIwCK7fj3PnfO2uJavbc\r\nsjABVGOXXs5t6BBDGo7gzEF04LSUsPnKVwEZcGN14K8fjpjl0M/7WEN1Nueg\r\nkE1rY5UjuEdJSRboUklDPYoUh+5EGCbTKiRZVLee8/M6ifdzk2twA2nwc5X8\r\nG9C0YzJ5j4GqVMD7WHpeyHQcPGc+zwhxcFJL4ZTCV9Qu0lESYPSDEPSwcy5O\r\n4iGBmJr2/i0P5XfzubTRg4n2oiJn06+BmsxhuMdIb2Dyez1188Yr0yaraGC6\r\n2Y3YLGePwUGwxle8l8mSOJHeqFXcG1JUih9sPo3IfGiK87IKFZzc1jecPwmG\r\nm0yJdtgWeb9q0+tuw7kboQnqEQ37Oyo1rnF2LgMmopFLaRx0Vy3hy2M9fPAB\r\n/rd3jQV05YlCETyMBxMQ8LyjnzfkEg9M0kOLFXVSG2/Qbdfi3Ejp/GyyB9Jr\r\nYWpqNbKbOnUp/zydJYxgnI5sR22Tl3GWU0o=\r\n=xmVo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_0.0.1-2a6fede5.0_1673343349966_0.5205270845194583"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.0-5f73ecad":{"name":"ipfs-http-client","version":"59.0.0-5f73ecad","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"0.13.0-5f73ecad","ipfs-core-utils":"0.17.0-5f73ecad","ipfs-utils":"^9.0.6","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"5f73ecadd7d397029be8dd9bc0dcd82469f07359","_id":"ipfs-http-client@59.0.0-5f73ecad","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-Ny/UxIvfRp79HK6Qeb2Gd5Wgv+HExKTCELljvE96rjVtWFLbgE0KujsAJNEV3NjhGVFqwtzRn6EMnnbHLIVeQQ==","shasum":"759977ddd7de93ac3bc1fbadded5012eda6a17b8","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.0-5f73ecad.tgz","fileCount":460,"unpackedSize":517448,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRlMnQFFFUj77aT7PGa1TYWyy4jyzOuxQxKMzEwS8N0AIgO/ebbpqWJrh1cAYf2CoXhjxUPvRF14ztft+2yH2yB+A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvZ0IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpiEA//fpa8jCUT164j1xbiqQt9n+fiqXigkhETEJznF//8rUXHWsDM\r\nCvqj3FOJFZsYY3YXr51Hno0y/azz/SxWPgsrYVTseHISbDi+ST+pah2i8fcQ\r\n17hX5EheHz6d4+3+GcU/9U68MaiHoCYWn5/JqthPE147keiS9ZZRp+lymGYC\r\nzup37hZW/hTDJi8/Ooj+UtL+rteXxqNDyTC1Jb9eTGN0xQ3GfsdikLBobPP2\r\n8jtZ3wFSOXinTI335ONkkpVa/UENtKBdWLj631hN2/Eio9ukwZKJC3mi4rfe\r\nmq7dR5fbXSPiR6BDOxBMnjZ7XnI2ULHgF9/x3RBxbM+A7ll4eVV82SKKJyZZ\r\nlZkcP5Fpyou6uhr166EZkWM1FDmsxE1qrwsFIZ8gVUZ9HdyzpnEIyRawYW3j\r\n8cGLfhW5GnihxbMpVtaF1m4rXYeK2Nn+bGsXcXm6bOOmfS5fpS+CfgLwRviI\r\nB10mcQ04vkhDCdlMNVzCG0zs9loYh9uD5XgGJOhFrQibn7J8UUDqDlpucjek\r\nK5/CQBhLOPGVixEqJDSaHFu1CZthtvxA0PLBESQyYiFhGFTZa966VVe6prWc\r\nyBFw/RnD77k94pJ4oSwcdBCoZC8J9lYAnVN7HfT50uTMhFc59FF5IejexG1i\r\nrymx/OzGNF/H4OvBd/GCzNHQB+dZ12CQPQo=\r\n=o393\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.0-5f73ecad_1673370887772_0.9597127412010975"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.0-4b4c124c":{"name":"ipfs-http-client","version":"59.0.0-4b4c124c","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^3.0.1","err-code":"^3.0.1","ipfs-core-types":"0.13.0-4b4c124c","ipfs-core-utils":"0.17.0-4b4c124c","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"4b4c124c4c49b1c60a68b4b8e24f1f00dd7f0517","_id":"ipfs-http-client@59.0.0-4b4c124c","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-CiyPDkRA3p3a3LL4uHyTwujR9/Toms2UK+MK3fj4jfRYNuEB5JL/ouooS34mYvZkIwaKimSQYiLEf7X50nBErQ==","shasum":"4c11d7130d5a2ccd0ea7ad078caf1024e6c1f6a6","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.0-4b4c124c.tgz","fileCount":460,"unpackedSize":517834,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGA5rOICbkjFoLPHyNxUTJFD9Pi+EPC3LEUiOmsrSDmwAiA4wBF0jqU8BjWFb/xK3ibmory4MTKx6lMJ0isgZdY51w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvt5rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogThAAi+CRHp5O1DWxjE9fg6GuSRkQ3+mmaWmIbTyBpbzCobOT8233\r\nsNacSV3ph0fy8+fIVwR5zYmLzqlV7/JBbCuTxk7bXa2xlXH5Sc2iXqnnRLAR\r\nnG1DeK8lcx1qM6DJD6lIOUgrharCO72wagQIrA5pka8Aan6x7YGIBhVF9uEp\r\n/Ju2IGS1+Kzcej/Wwi3fntag2Ughefa4Em8BMO/nCkT/YvkvG91WaSkAV2R4\r\n2POMRPQmxpHH+7M7L+ICY7bkENDlPRRbabIdb9wyaq7Az5OB5oN5AXXhLLSZ\r\nt+6P659Ydmg+bnSMBYPkcC0rxvNWo6RQkYOcWW9ZYGM5nXR0IbF5r68Nwl4m\r\n6IfEdVV1AoNg4C+pjyZH0tF3QydEkS4P3qBa3umDHW0Df5N4ftnP+HvSGwiJ\r\nTCX0oVkqZi9rOSOdzuQ1nqeC6ahi/dGWLv76G1k97blE5MrcvIRjK3FePN0+\r\n57jWmJoYTBwtYteuyoK/jQxEVfo9IDaBUqLKxcr0xXEYo4NTDTJ/19ikBs0G\r\nVEI0fcCbRXAs5r7RJNQ8wSUQ4p3mXVeKgnAJryWAV77pzVLagLeZ27GpniYa\r\n3VduzPHFpw+74JBq2nS4sQczTts0iWHum6wGqxUvjxJfnCWdIf+k1Lg3c9z9\r\nPN0GReAS/7s1jmbtnYTczDQd9KGfME8u9FU=\r\n=KEI/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.0-4b4c124c_1673453163114_0.46023948418539407"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.0-789ee585":{"name":"ipfs-http-client","version":"59.0.0-789ee585","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.13.0-789ee585","ipfs-core-utils":"0.17.0-789ee585","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"789ee58556083ef71a4ef44e3358f86c5be101fb","_id":"ipfs-http-client@59.0.0-789ee585","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-+1W45m2u0xTy71tbhPF19xKaueMGGJn709IZ+oIT4nu80HRIN8OlyWsvdFpRDaegfZbr82es5NO9f/1b97d6rA==","shasum":"a4e85c3a4ac3a7679cf52b83e207e811f4e6fffc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.0-789ee585.tgz","fileCount":460,"unpackedSize":495316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICt9URSA9hoqc56+2VyUq3oTMimbteRpKz0yd01xvsbWAiA96ayKK00HU6j7H14l26CR6ALSKlvrlqiBw99y4CM+OQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvuxoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo//g/+OmDLeJn/JDN/H8mUm4lrqD/WL19yMxrLCBIqaotBubUHBQ9D\r\nClB3ZG9cPYdSLdFDqFVssoCMaOLOtFBw6C/uYQNqQ+CTC/Bl6ZX9Z4hbFEvu\r\nDjRvsPTRS2X6Y/f3M83CAecF1exVXTto8jtyAYtbzr4DLu0MgYIXIZl7nrFV\r\n2dolUnJ9HWLSaXLr6ecv6zmPPSE4lKvUjdModNXmGFa8q/MZESAQftgwY1qw\r\nSLZeZytV28sXRhHHakI/H3n8d6HguQjvqXZe6lUQh7yACOYpaLKG7aU6FDN1\r\nGopzTZO4tZoPHDPYD01/lzMKC2N01sdDTANOzkRehbLWNzByActNH6NrivaP\r\nCfjbdLSpfP7iCaXvBnthHvdNMMtA3UkuV0C99dQzuDf5aKU7CdUFnNYp6h9s\r\nRvN+olZXSe7BmLE5kkWXlXXagoqmSga4AMWdqPeNXchm5jN2Vuiegjk2Bu2+\r\nlPklpWmuMeE8BeFYyEwiDN06fujzrKAP6RPZJlI6hq1nL3k91iFADStKDu8u\r\niJbK0JN9vd1oE/wHoer5WcApS1jKeVoxenAZuuPFi3OKNhc5RKopqpmYGxGr\r\nCKEH8ol1QafoOVfEnEqKkYRNuTZ9eySRq6VO7uDJ60NLPBNwleRPRdrPfySH\r\nttEgNDNgwbaWXtURGknVMLNTrA/q0+ofenY=\r\n=bbmw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.0-789ee585_1673456743912_0.5850226096882474"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.0-fa578bac":{"name":"ipfs-http-client","version":"59.0.0-fa578bac","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.13.0-fa578bac","ipfs-core-utils":"0.17.0-fa578bac","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"fa578bace93e459849a0ffcebbd6f222dc05652d","_id":"ipfs-http-client@59.0.0-fa578bac","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-s8iQF3sq3ql5vQ7k5cIVdXXEv2ZLRVeCWhtRfchCgbq5iHN2XMuJW5OiaOLeqRlHFrgHC/E+A4iOjNQ5IuNMpg==","shasum":"ffe763926cecc00e52084564cd89ef6dd572fe52","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.0-fa578bac.tgz","fileCount":460,"unpackedSize":495316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGtRKR7+KxoosO2N00M/BPHzwYejqxoS9a5WkVpsAJZ4AiEAxUWlyE6ozEIAjTcqqEyglTxyI5EJ8b7EAokNDc8rXOU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvvbnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrw0A//Sg48AFQWeq6m18eHGFBVBLEm2rjVC0kQL1TmpDecdaaeTkCV\r\nK9nsOBSBdI0V2nu2Y6GAP+yp7kWZCDM15PaYFHMWHrWaKN8XH0mYfJPFC/PQ\r\nF415q9ZsVB/GFcOA/0fcMYinH47+LNsn9agq9XBzwRxc4MHBe7ie+YKYn9Ca\r\nuJ7BhTEaPBzYaldEpul4SQxhv95lilu/ksF07ASYHDFXVJp9VLajKOgOJaNo\r\nlPFZ2byn4rPj1IGwELW9lp7Q35mPGxTrKUWS9jgsLLGhBSHCcTbto3vkPhpf\r\n+N8bldDY34tBysjU6nM61S7/QMUUJw7NOksfDwNYqZ9VQNQ86WBH4LRAeITr\r\nEwg1ZWEv2dTn5t4MzZG0ec1nAsxPwtXflIBom6oALYXtPZ2Q/6GQflRui+Kz\r\n4mJxdD+4AV6CrKgqnKP6vgYoOFhhOFwqPkAwGcNEKAWGEh/3Tpq9wi5+PfZn\r\naeCf6AOt6qscnIyjM2JDGKIuGbSkTMwmrhu3L2H4JO2vpAoEVLTxLGMRASWm\r\nnTatZ65xOevooP3ZMbJeOP0ckQNb4rP2IJpTz6R8vwGGvWrmL5TriCO0a5ER\r\nBjBKBKlxLM97UTW/t3BxTycjxCDGUVf3JU2Xp3hNCgi03q6mOzRggD6LN3l0\r\nKPc5gUUHjamsqoQ60Tup09X9DZsQgTQeygU=\r\n=IzEW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.0-fa578bac_1673459431099_0.6028064147667507"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"59.0.0-d1c3abb3":{"name":"ipfs-http-client","version":"59.0.0-d1c3abb3","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.13.0-d1c3abb3","ipfs-core-utils":"0.17.0-d1c3abb3","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"d1c3abb32b57379b5446d5eda232d7750a2ecff0","_id":"ipfs-http-client@59.0.0-d1c3abb3","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-6JX0gc9VhV9uvNVrZXcIx6r0OmNRLlnO4oZctXCLa2TJ8V5pFEhWzKFCKOsWbHZUPHEAGDneapcFt92ceCFkYA==","shasum":"51a2f13831fa9bece332177b844438bd31f3cb96","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-59.0.0-d1c3abb3.tgz","fileCount":460,"unpackedSize":495316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdN33NAl4bqICWzIb4Qi7vqmhgdcu0pd+Kt9AXv7xGawIgZberFw5Lydm/UkRRqHN7vSteohiA9bVAeNnlWeOhk4A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvvtDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOWg//XmXexHcZ6zGTb7Vsi7j107VZ34udmDx49pD/BEXuyzx/WEdu\r\n4NwYun6Is48/OfilNgqXAyo3of2fdhznwSqx9NSqaYX4m7VvXn6WcWZf3H9n\r\nqJZA7LLyruJA2DVaSgXqEG19giY22pZRQuyelD5tz9C8mxO26fWiYZykqaaL\r\nd9IWHWrUnwih9AXmpAPHEEcK43tmU98x3BiMKROsAjDC8k8EgpzkOmNT3nbd\r\nlL49zEhEHZxgLLPcLMUMubiQ3Aa06JfSvp4bK5s42dk9sm/OXFt3PF/f8bpZ\r\n821hfgQT60L3bXuwvNUwGjMBaHaPxb9S5pWuLD9jkpB0KM2xZPRygV2iz2Ze\r\npfQUr+f3xEb3ZKQMq6kKKJtOozQt4fn3jIvMAVV/zocrqVUgJhZaWY7RdSM1\r\nEgWMFtWJ31OvTPd5McPk/N0fdHh0+dEUTKDw8ffIDpblOjgvd4ogPgeuX8z6\r\nNtUp3jFhVT+KkzedogIhatskSbeEpPZVeHD+/MJjgig2J3BU3vmZoodD7k2v\r\nN9jUBuY/kA5+UyCOhkzYQpDwjl3nc9VQwrasNqtoHrVFOF+zbwydZ9YPmC9F\r\nceEA5elBl6P7GNkuPuDrCvo5EKaZbeFMuOJH/zBHNPg1HxRTuMTqSdnsXICn\r\nAfH+gQPYOlsOkEX102nHnNYR85kTr3IQ0Kg=\r\n=vvaR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_59.0.0-d1c3abb3_1673460546881_0.5052847938099301"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0":{"name":"ipfs-http-client","version":"60.0.0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.14.0","ipfs-core-utils":"^0.18.0","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^12.0.3","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"6e940670681859682d41ca1339744955c9ee20bf","_id":"ipfs-http-client@60.0.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-d6Rqc1UP5nWhp7j0PumK80CA5LvbTvskro+qGw7hgWvbfQ0rX/5ddig7ELvVYJbJM4YBxCJSaSHDEOGoSpzzKg==","shasum":"429ca98544ee1fde79f96ee055d95a789384247c","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0.tgz","fileCount":460,"unpackedSize":495291,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjMbWKBto3kFHzltWugmJulqpdac8PHaqIbPibWguSbAIhAJgR5frVUvwTXn51VHX1kc1vKdM19uJaFDp2OBbSyeHn"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv/DMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqChxAAkn7drBNIV6kGc/CHrFOBSoGZsu3hh47ERchA3vhpoWpjQtZX\r\n3WZ2UVgCTf5P7IeFu4J6EOCFs36t2fpqOy4gBiuiex5wQje05sxWbUaQHkAS\r\nj0ywTW7c3MLq+LDlRWINRnFXjSqhTR4FxzZmPC3LaD75QRrAfHRD2g8yGlAF\r\nw72gndem+1eAgKsqsAOn9o1FltHnOJQfj6ENCg2PZ84Epn72v/VuiQVv09Qe\r\nO0QQKe+M5IU2sRystoTBSnhUwfOskX8RD/34SfAhSHd9I6ev19OK6F/4QUvd\r\nI+pApdozpaGpnYyl6+UUrSEqeIX8ZzJeOM1EWgYiQabtWRhy3JHmhXXBpK8+\r\n5BAS4z3/d1is++iE7XFc+zdxcvGQKFhTCMQensWXHinNT0TzbH6SuQaS7pLb\r\nMibUzlhuuWHGsOoewCIM+hcJ3gH65m15sf7o1YUgo9yfkLjLCRTc6sx7pu0z\r\nupLhaaRsyOhTNgjA1LBiGuE4aWJElju9A+OFgUkx40zId7wx1C12aNr1MLfy\r\nqUYeeshZRA6ZvMWAKvuM8f1sA+d9/7CVoG9o++oy54aYfetCKG8w6CF+bLNM\r\nai5qLORT60st6nvVUuQ28ymKzGfJr/yfy5G2zD/pVVO/FjY3u7E2MZNmk9qO\r\nGsX1ymv2gYWBucnZe84Iclu2urqW0eoSDeQ=\r\n=8V1w\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0_1673523404355_0.6197532918786595"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-6eeb1be5":{"name":"ipfs-http-client","version":"60.0.0-6eeb1be5","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.0","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.0.0","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-6eeb1be5","ipfs-core-utils":"0.18.0-6eeb1be5","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- omit in toc -->\n\n[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)\n[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs)\n[![CI](https://img.shields.io/github/workflow/status/ipfs/js-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-ipfs/actions/workflows/js-test-and-release.yml)\n\n> A client library for the IPFS HTTP API\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#Infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for IPFS implementations.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"6eeb1be57c8366b82351030e49a5886d1aff8bf6","_id":"ipfs-http-client@60.0.0-6eeb1be5","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-cBFeogg4f0PsqyJkJeLTDVqC5wT7Ge/q5gv7QeKLVtYzaX/PPee8k6SIvxEk20XrdJn+GmZxkKSHzQBCo1RbCA==","shasum":"c3b861d93bd29dfe50acda5b36a03bc777610750","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-6eeb1be5.tgz","fileCount":460,"unpackedSize":495316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSbHiumOaEzMXt5wA3HqKrG1kSjpV8a9SbXd42jmkDpAiAWwbIzozWlLtgw9qWpMtyFdEPnsFCpHYWF3UGtRQh63g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwaD6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpolQ/9EDBaPCt+hkvQ2b5pQHZBYTGejonXiO06uMksstVkU1X5X9gY\r\nrZSRJZtZU6cTAPBdtuK3Et45aDCZ9d9XGcKaVchBljqEYba10ti2I8fk1fBQ\r\nkIzUVDyTkjUa7lVqjfioGLiHm6pAvKAkVI80bzAr6+s7wC+lMgo4xO/zbKsj\r\nShqWUu4PlpkntNvqfpdv/LxlPmFFmBiKyTiWTbHguUnLA3f6q4JeZ9gV+kkJ\r\nxcHAjIW48cy7yK+XPo8ku071YIcPKaOkj/INQRcEDfd6Pe7tmPqxHgr8upnf\r\ndDv+UH4xUd1QNhGiiQDjijmIlOm7leim6sW0dnvRdy8HaWJHaO8owoz1jC1q\r\nrcIwyFnYKf4V61Y+sqHo+35rZ+RpFh7fusSW3Lc4N4bwG/t6iZGtj0pISNOj\r\nteHy9XSPR0R+EGhlH6HesHXscQlBxRp5pfTZQCS3XKFPDORfJXwmNhgmQ8US\r\njU38FLCuujBhJblYx4q5g2nY49haCS1isuFXOaus9F0NXA5/BNzXhiTNFGhb\r\ngyc+ssQTteJm57yWF2HUCz3GNIxisdJ4jtSUYF0u3JgGLL/4QETx5MJ2etFF\r\nVzukuKMk8G3ifIW2NduF/VJUJSPXZswcF0EXMX7UuVSFZK3TL0FDEtc4CUbU\r\n4DkrNRuGX5/06se6xsHqR4QWXMj8VgTPRLk=\r\n=dtxI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-6eeb1be5_1673634042211_0.8032143282850421"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-ab02e8f8":{"name":"ipfs-http-client","version":"60.0.0-ab02e8f8","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-ab02e8f8","ipfs-core-utils":"0.18.0-ab02e8f8","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs. \n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"ab02e8f8b3cf8f4eeb9991fef3b0104728ced675","_id":"ipfs-http-client@60.0.0-ab02e8f8","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-DnEOw/T9Yi4gdcraxgB+IH52K9SB/F7LCDM8XvDD4aLCPgKZBO5H90CbIUeYKx8vDKBmd33k2ILUYxtczMosrw==","shasum":"25fbe00c40f2a218ad96ece0b7be6b515e7f4814","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-ab02e8f8.tgz","fileCount":460,"unpackedSize":495779,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEmZor2rE5W6KHUBXRV4KPJ08TR/Rh5ebYXbIREJWU5AiBwzNebjz0wGexO6yjTVWHDtwxGzss1jb8hOwD4idq8Vg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxpN2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpY0w/9HXU/tZkGTzYs5Eik/UOhvsF6vXmDUCMHBI9gJJOka0Jc8AHg\r\nf+0imfBdBvCsJm7BEMvzysXTFJ2//Wf45HFP3ToJE0TWiD7XwRopfx0iO9HR\r\nOyUdktoKUsk/mvfAJqG9DcQn/PR8OfPOpwg1K+jYbbEwFJR0NZfpaXWB0I1q\r\nqkcsSDLgrlGiqCFwaar1F/7LxKMBVClEIYuQdn+W/Vubb6H4om4vlxb5jmZc\r\ndJqehh2rNMVe2nrbKjhOH8R2RB7tPGpJ288Ee/HhnHwP4bw1G85mkeNcPa7y\r\nmp8TzG4OWwhD3Q5klPRRwp3j3PP9JAfClHm4ehcSAXsk0N7K85ZRC7ZG+g58\r\n8PBopE2X2k2ndfteGznU20unuPTyRvpCQ4K5tYWrNQqXkeAG3McopJI9KFvU\r\ndbzLvLhq2gqjXTiuo4lkepFRXtuK6dVQUtOC0hSvRVywtRsaKF8wa1i8yc0W\r\nQ0kB5H1weACqjrC3TkgioGZ5khBdAAsWH9ZqPpIvAxhxg3I6+50Ev4qN/A26\r\nFmJktvOKvI3cw6W9THQLEQHqWH/Ma/MR3CeJoxUH0eTnUyn44VSMFEP0b5B/\r\neqvaXTHaUF+zTg2UcRZYU5tNO5eLSpzh7MtZEQPL4qLC5q55rYQ0sxP6ZqIs\r\n508gI4khzA8hfzxldbG8bodmy9P8WROhTes=\r\n=ssxa\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-ab02e8f8_1673958261817_0.5844895662854017"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-3bcabe38":{"name":"ipfs-http-client","version":"60.0.0-3bcabe38","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-3bcabe38","ipfs-core-utils":"0.18.0-3bcabe38","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://discord.gg/24fmuwR\"><img src=\"https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord&style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"3bcabe3818ce8bbbafe0cbb68749b286d8a7edd9","_id":"ipfs-http-client@60.0.0-3bcabe38","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-uYHd6FQWlkXO/UXTUzcq69wv8rx82CGGIdfS9e4OGr4n+aKTLoEKw8+1YqKqx+5idjTgFJjwO5KFBSTQgY/g4Q==","shasum":"5e967baca259e45b5cda54668ea8eb80c212cbf4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-3bcabe38.tgz","fileCount":460,"unpackedSize":495906,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICybS40amM/+NL5BNQYa/xGIb/x5/U5C+7jscGqmXyE+AiEAusa9My52ryeYx6BFMHuVkx4regSJKhtHN1xI95lbppI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxr9UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoj+g/+IRgBgD4o86TbBIwqZxHCf9i+uc0DOfVLk7KV0fwqAifg+XT3\r\nLzG0tLIK6fgDw3S8K8UBQ97gnYFRtznsPvlKxMSIajM2/IQqJMcEs8aGudof\r\nZYqkQRqp+t9eulzZyyRq3W/gM+HojEKTUxVBWXxhSfm2MaHeNAytTf/MH3MJ\r\n1MJLj3iTjv0XtMEHoNGr2YILtIe/eqk3CgNnPH9ywpuGik8gqJwNbRdPjNJ/\r\n/IrL3wNbB7M8w5NBOND0/yz9ZWL1IQ0SX2lntp2w3ATGT72IV2dTSWkFuKJl\r\nAw4ELWALJoeQ0750zhSXd15OWAoD3ZvBdGRPgnxru+8Xji3GOuuQwzcylCcZ\r\nJrsflcMbvus11N3qAn/pRATUUku+l27to+XuWEY4L0HUDxrLChL2D2ne1cz5\r\nzgF6E3daJkSTWw7dgN7v2ffFMGIBBq2sjRmiGFt+tWv2wFmAVFwOOVDPouKq\r\nPv6FZG86gFA4CPSqnuP7kefPIiTmnDFP8Suyks7H1u0poh68lKBgJW7tlsil\r\nUcUM3rvASaKu9Yj0JPAng9kTOZDuzZwJY+eD8cUTP7dg47RfzlJ2EAzz6+yD\r\n4zCv3pqyZB8fM2y2UtaCJLTBDjHXADkeN4Li7lVdnT48WhihLnCVWSIxrw2w\r\nFdL1C9BI+sL9TafQMufRlkc/b0+rRoJ+G4o=\r\n=EBQl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-3bcabe38_1673969491820_0.3820029397315885"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-b64d4af0":{"name":"ipfs-http-client","version":"60.0.0-b64d4af0","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-b64d4af0","ipfs-core-utils":"0.18.0-b64d4af0","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"readme":"# ipfs-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n  - - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"b64d4af034f27aa7204e57e6a79f95461095502c","_id":"ipfs-http-client@60.0.0-b64d4af0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-esoM51JTXOlNfaVyw4uSRYaNo4gPjq3mD4nlyK4bnLIf9+3n5LppkoNgZDrlIRVhjCXqFCJMomm9oz2nR6GAHA==","shasum":"741775b6ace599030831b01d230ff3cab5e66727","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-b64d4af0.tgz","fileCount":460,"unpackedSize":495854,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGzQ8v9NRS+QBb03XdMwX9ULUctvmD9u254n3YPUPuHPAiBp13ZUQh6rsjRvDxy+QcrVylo6o9QJZ7pRZTj8t8PhNA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2kvqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWPQ/7BrG9pM8doDM1DeY59Nh2ALx1YRgCxYfz3d7uuh0pHoBgcG4V\r\n6cXgQqOJ6VTDuU3UrPBoaWS7qMLNhWaK+0UXUWgL7i4ceJ3dpkanSr1pd8J7\r\nOF8qDT02jsmbVxPeQBJmFHXhx7WmF6/nj9egNg6+7I8Yf8PnPCpgqlvgXSi8\r\n+hNtlSkoPhBG6rY2/pOJyL0PvexbSOnBtLV3FMnYRKzfpF4fPk/qlaC484tH\r\nlMTZZzqo3QrSkV43GQoNNB9Y6Ff17HeFV8MSBNRyYOUWg6WDa/sOqnM9iD/z\r\nFpqY1/4yTNmAmyZv2W0V2wx6JR/16RGD/RDrRrKcgGpQWn6g7yjotitcRQkN\r\nN4/ULxdhMgfZnrHFc7QkSKJHKaC00io+YaYMeL6qJHdhKZpdV1Ns3BH2/SAq\r\nZ2woBeab5//uEBHp8JPCQlc+9ry41p+5EvmSFN5Cxl301kYOjLFd3yVhArmz\r\nA4KDpbRb9lxnfQNYMrQBowOJit3tHM3B7QkMHHyz8DzacNZYrhshy0+KDznl\r\nTy/GIa9PSfYeH9/2JDmYL5+yi9ufEFYwKYdxwtOi/afDL/xlCOmCOrRz5IcS\r\nsjO/hyeJLrFTaAU6DWFa8IZWRs4kauTmkxuo3NkhGXypFDnHnD0B2ueNmhJ6\r\nyFi9AWYHJfjVbpaCqKTCIflpVuGsRVAjDYo=\r\n=4hZs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-b64d4af0_1675250665754_0.7058041722645056"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-e64813f6":{"name":"ipfs-http-client","version":"60.0.0-e64813f6","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-e64813f6","ipfs-core-utils":"0.18.0-e64813f6","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":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-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"e64813f6fdc681328da7cb893c93e1f4f70bfc99","_id":"ipfs-http-client@60.0.0-e64813f6","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-I8i5Ef3SnkAm5Csuna1APld8M6xyW4R6mo8zCluw7M/5fsLxFmKvZ6RBgh5duFgxoKd8+CvwWvlsbIlHiarFdw==","shasum":"7cb176272771d7187d518259037d5abc156670cc","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-e64813f6.tgz","fileCount":460,"unpackedSize":508893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDhz4aAu+2locmJ1bnRqYbRNnrk8igAosna37FbiYbiRAiEAvs7+tSAwsCPdZM5AZ/lQqOh4tnh59Dt6dbLBtkThkMM="}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-e64813f6_1684953947205_0.15130763609135967"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-4694e806":{"name":"ipfs-http-client","version":"60.0.0-4694e806","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-4694e806","ipfs-core-utils":"0.18.0-4694e806","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":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-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"4694e806aea15c66db32e3b4be81c0a5e2fb8ade","_id":"ipfs-http-client@60.0.0-4694e806","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-gbeAcwmDDaz26+c4lVkWklCmVGPTviM0X4ul90pBbuTEGwRoNpw91JtPH6YwTkSxBMY7ssz9BnH7cjtw7ltqJg==","shasum":"76fbc43e169e985ab94bfd8bc1ad33bed50f1557","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-4694e806.tgz","fileCount":460,"unpackedSize":508893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdps+6O8mx/WG3uOWudATO2o8eMQTzV0gsFLflkRPO5AiBAPpV5tBcO13zPjOVGEPLbLt/4irV7Sf1Ho/TW1Vr+hg=="}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-4694e806_1685014306826_0.5556912604891808"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-6d95ce08":{"name":"ipfs-http-client","version":"60.0.0-6d95ce08","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-6d95ce08","ipfs-core-utils":"0.18.0-6d95ce08","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":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-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"6d95ce0864055e5236ac88c0999460ebc5075c10","_id":"ipfs-http-client@60.0.0-6d95ce08","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-hHIRsjKoNxm+vm4Stbt+ki6Wbpb8iheQtNT1Z1tv9DGlww03klJK4XYkByXeN3no9NQ+M9d/w9HbLWB7VLdWUQ==","shasum":"480c5aafb8f29e6d1d37586eecac1675b7679b32","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-6d95ce08.tgz","fileCount":460,"unpackedSize":508893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdgMc39AHHAKAaifuPhBj29JWSiXwFnHWiVxMD9w8BVgIgP/OGTxuG3nvkzPX17Mj5u0UKLOtBJ6e6h3Gu21tLv/c="}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-6d95ce08_1685016637332_0.002998463403816265"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.0-7b79c1b8":{"name":"ipfs-http-client","version":"60.0.0-7b79c1b8","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"0.14.0-7b79c1b8","ipfs-core-utils":"0.18.0-7b79c1b8","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":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-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md","gitHead":"7b79c1b8df5c818dc124b346ea28330455732d5c","_id":"ipfs-http-client@60.0.0-7b79c1b8","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-BEeZbeiEouVJ0DBlIq+MdvzL/Tl8Rhr5mL13JLOvoyeJN13sqpT0vGR5ueoCve9hALrQxigpVilpnt8lflUh0A==","shasum":"6e05d0d78f84c842d23e622e0ff280e1a9bad7c4","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.0-7b79c1b8.tgz","fileCount":460,"unpackedSize":508893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQKElgYykerA/mhkGOXOT+CFkO3NQOLKQaQuEVBNWq9gIhALswvNkTF9a5XDPa46NCL6WXv1a1s63Aq4gQElxoQskg"}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.0-7b79c1b8_1685018780607_0.8917299951388955"},"_hasShrinkwrap":false,"deprecated":"js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details"},"60.0.1":{"name":"ipfs-http-client","version":"60.0.1","description":"A client library for the IPFS HTTP API","license":"Apache-2.0 OR MIT","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","repository":{"type":"git","url":"git+https://github.com/ipfs/js-ipfs.git"},"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"keywords":["ipfs"],"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"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"scripts":{"build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","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 -i ipfs-core-types"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","@ipld/dag-json":"^10.0.0","@ipld/dag-pb":"^4.0.0","@libp2p/logger":"^2.0.5","@libp2p/peer-id":"^2.0.0","@multiformats/multiaddr":"^11.1.5","any-signal":"^3.0.0","dag-jose":"^4.0.0","err-code":"^3.0.1","ipfs-core-types":"^0.14.1","ipfs-core-utils":"^0.18.1","ipfs-utils":"^9.0.13","it-first":"^2.0.0","it-last":"^2.0.0","merge-options":"^3.0.4","multiformats":"^11.0.0","parse-duration":"^1.0.0","stream-to-it":"^0.2.2","uint8arrays":"^4.0.2"},"devDependencies":{"aegir":"^37.11.0","delay":"^5.0.0","go-ipfs":"^0.12.0","ipfsd-ctl":"^13.0.0","it-all":"^2.0.0","it-first":"^2.0.0","nock":"^13.0.2","p-defer":"^4.0.0"},"browser":{"ipfs-utils/src/files/glob-source":false,"go-ipfs":false,"ipfs-core-utils/src/files/normalise-input":"ipfs-core-utils/src/files/normalise-input/index.browser.js","http":false,"https":false},"gitHead":"bf1bc8b18d750d5591bdd575a6d0f4c067d61d0a","_id":"ipfs-http-client@60.0.1","_nodeVersion":"18.16.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-amwM5TNuf077J+/q27jPHfatC05vJuIbX6ZnlYLjc2QsjOCKsORNBqV3brNw7l+fPrijV1yrwEDLG3JEnKsfMw==","shasum":"d2e9ab430aad43a92a6e44008e534afba4fd22b9","tarball":"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.1.tgz","fileCount":460,"unpackedSize":508868,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6c/25IZcyXy4pmyVmqWgmkJkZfTnYKMxrW1Exsz/hbAiAJ4mj34NAqRDZFDEC3ZAx2rCux4i8VJuY3oMsJEWUQNQ=="}]},"_npmUser":{"name":"npm-service-account-ipfs","email":"npm-service-account+ipfs@protocol.ai"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"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-http-client_60.0.1_1685026781858_0.2442736698728334"},"_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":"2018-11-28T12:03:49.523Z","27.0.0":"2018-11-28T12:03:49.781Z","modified":"2023-06-01T16:26:06.106Z","27.1.0":"2018-12-05T14:36:34.077Z","28.0.0":"2018-12-11T09:04:52.992Z","28.0.1":"2018-12-13T14:40:04.510Z","28.0.2":"2018-12-14T16:07:09.429Z","28.0.3":"2018-12-15T19:34:13.777Z","28.1.0":"2018-12-16T22:30:45.865Z","28.1.1":"2019-01-04T11:51:37.179Z","28.1.2":"2019-01-14T15:49:02.483Z","29.0.0":"2019-01-15T10:45:53.744Z","29.0.1":"2019-01-24T10:43:46.815Z","29.1.0":"2019-01-29T14:04:11.930Z","29.1.1":"2019-02-13T09:45:14.001Z","30.0.0":"2019-03-13T19:11:16.826Z","30.1.0":"2019-03-15T10:10:44.904Z","30.1.1":"2019-03-28T08:51:10.790Z","30.1.2":"2019-04-09T15:49:42.822Z","30.1.3":"2019-04-11T14:20:45.379Z","30.1.4":"2019-04-30T08:00:31.757Z","31.0.0":"2019-05-13T12:21:53.177Z","31.0.1":"2019-05-15T15:51:15.622Z","31.0.2":"2019-05-16T15:50:53.083Z","31.1.0":"2019-05-16T21:45:20.313Z","32.0.0":"2019-05-21T09:25:43.019Z","32.0.1":"2019-05-21T21:17:10.231Z","33.0.0":"2019-07-10T09:30:21.561Z","33.0.1":"2019-07-10T14:21:55.767Z","33.0.2":"2019-07-11T11:04:20.401Z","33.1.0":"2019-07-11T13:14:45.430Z","33.1.1":"2019-07-26T18:47:23.875Z","34.0.0":"2019-08-29T11:40:10.345Z","35.0.0":"2019-09-04T15:36:16.390Z","35.1.0":"2019-09-04T16:42:58.576Z","36.0.0":"2019-09-11T10:00:32.436Z","35.1.1":"2019-09-16T06:57:47.614Z","36.1.0":"2019-09-17T14:54:35.955Z","37.0.0":"2019-09-17T18:57:01.419Z","37.0.1":"2019-09-17T21:53:16.279Z","37.0.2":"2019-09-20T09:52:58.043Z","37.0.3":"2019-09-25T07:58:30.242Z","38.0.0":"2019-09-25T17:30:07.995Z","38.0.1":"2019-10-04T11:00:47.043Z","38.1.0":"2019-10-04T15:20:53.672Z","38.2.0":"2019-10-06T16:13:27.611Z","39.0.0":"2019-10-15T13:03:03.784Z","39.0.1":"2019-10-21T14:59:15.341Z","38.2.1":"2019-10-21T15:47:24.734Z","39.0.2":"2019-10-23T06:26:12.589Z","40.0.0":"2019-11-22T14:39:23.406Z","40.0.1":"2019-11-27T15:55:19.976Z","40.1.0":"2019-12-10T16:32:44.838Z","40.2.0":"2020-01-09T11:43:30.803Z","40.2.1":"2020-01-09T17:57:34.405Z","41.0.0":"2020-01-12T08:32:16.836Z","41.0.1":"2020-01-23T09:36:54.220Z","42.0.0-pre.0":"2020-01-23T20:26:39.179Z","42.0.0-pre.1":"2020-01-31T12:48:42.863Z","42.0.0-pre.2":"2020-01-31T12:54:11.557Z","42.0.0":"2020-02-04T11:59:49.026Z","42.0.1-rc.151":"2020-03-02T13:11:20.239Z","42.0.1-rc.145":"2020-03-03T19:05:22.571Z","42.0.1-rc.115":"2020-03-06T07:21:57.025Z","42.0.1-rc.91":"2020-03-06T13:21:39.365Z","42.0.1-rc.74":"2020-03-09T14:13:21.143Z","42.0.1-rc.55":"2020-03-11T12:57:36.617Z","42.0.1-rc.49":"2020-03-13T19:55:44.416Z","42.0.1-rc.5598":"2020-03-26T09:41:12.352Z","42.0.1-rc.5616":"2020-03-27T19:59:25.225Z","42.0.1-rc.5619":"2020-03-30T16:39:50.472Z","43.0.0":"2020-03-31T09:41:32.574Z","43.0.1":"2020-04-08T17:14:39.880Z","43.0.2-rc.4":"2020-04-10T16:55:27.705Z","43.0.2-rc.5":"2020-04-14T19:06:45.847Z","44.0.0":"2020-04-16T13:13:48.368Z","44.0.1":"2020-04-28T12:52:05.267Z","44.0.2":"2020-05-05T16:00:50.383Z","44.0.3":"2020-05-05T18:39:44.801Z","44.0.4-rc.3":"2020-05-14T12:16:50.944Z","44.1.0":"2020-05-18T09:37:15.165Z","44.1.1-rc.7":"2020-05-27T19:50:30.191Z","44.1.1-rc.8":"2020-05-28T13:30:27.970Z","44.1.1":"2020-05-29T13:44:22.797Z","44.1.2-rc.2":"2020-06-05T08:21:53.707Z","44.2.0":"2020-06-05T12:34:34.846Z","44.2.1-rc.2":"2020-06-08T16:09:16.978Z","44.2.1-rc.11":"2020-06-16T15:26:05.979Z","44.2.1-rc.32":"2020-06-23T11:52:48.709Z","44.3.0":"2020-06-24T12:59:07.950Z","44.3.1-rc.2":"2020-06-25T12:21:49.898Z","44.3.1-rc.3":"2020-07-01T11:25:11.524Z","44.3.1-rc.5":"2020-07-02T13:20:43.176Z","44.3.1-rc.6":"2020-07-02T14:08:25.550Z","44.3.1-rc.7":"2020-07-02T18:10:46.188Z","44.3.1-rc.14":"2020-07-07T19:01:21.145Z","44.3.1-rc.26":"2020-07-16T12:01:24.928Z","45.0.0":"2020-07-16T12:40:38.573Z","45.0.1-rc.11":"2020-07-23T09:52:45.885Z","44.2.1":"2020-08-12T09:56:16.563Z","46.0.0":"2020-08-12T10:17:58.088Z","46.0.1-rc.2":"2020-08-18T16:00:56.868Z","46.0.1":"2020-08-24T16:58:18.473Z","46.0.2-rc.0":"2020-08-25T07:12:27.396Z","46.0.2-rc.3":"2020-08-27T17:27:58.124Z","46.0.2-rc.5":"2020-09-02T11:11:33.335Z","46.0.2-rc.12":"2020-09-03T12:59:22.078Z","46.1.0":"2020-09-03T14:18:39.400Z","46.1.1-rc.25":"2020-09-04T14:27:32.571Z","46.1.1":"2020-09-04T15:04:20.193Z","46.1.2-rc.2":"2020-09-09T11:49:57.168Z","46.1.2":"2020-09-09T13:55:46.954Z","47.0.0":"2020-09-09T14:05:03.901Z","47.0.1":"2020-09-09T14:26:33.260Z","47.0.2-rc.1":"2020-09-10T08:16:13.529Z","47.0.2-rc.2":"2020-09-11T15:12:11.023Z","47.0.2-rc.3":"2020-09-14T13:08:50.375Z","47.0.2-rc.4":"2020-09-25T13:48:51.697Z","47.0.2-rc.6":"2020-10-05T22:17:27.946Z","47.0.2-rc.7":"2020-10-06T03:02:46.916Z","47.0.2-rc.9":"2020-10-06T10:47:36.224Z","47.0.2-rc.10":"2020-10-06T12:43:14.993Z","47.0.2-rc.11":"2020-10-10T08:14:49.668Z","47.0.2-rc.12":"2020-10-10T10:13:11.235Z","47.0.2-rc.14":"2020-10-15T15:45:36.362Z","47.0.2-rc.15":"2020-10-15T16:03:53.093Z","47.0.2-rc.16":"2020-10-21T16:46:28.037Z","47.0.2-rc.22":"2020-10-22T14:05:08.895Z","47.0.2-rc.24":"2020-10-23T11:32:59.349Z","47.0.2-rc.25":"2020-10-27T07:53:47.652Z","47.0.2-rc.26":"2020-10-27T09:24:05.739Z","47.0.2-rc.28":"2020-10-27T13:16:38.697Z","47.0.2-rc.29":"2020-10-27T15:11:02.813Z","47.0.2-rc.31":"2020-10-28T14:35:16.389Z","48.0.0":"2020-10-28T15:52:24.850Z","48.0.1-rc.2":"2020-10-28T17:07:44.329Z","48.0.1-rc.4":"2020-10-30T11:31:22.523Z","48.0.1-rc.5":"2020-10-30T15:36:00.793Z","48.0.1-rc.6":"2020-10-30T16:53:56.951Z","48.0.1-rc.8":"2020-11-02T13:52:52.906Z","48.0.1-rc.10":"2020-11-06T18:26:47.009Z","48.0.1-rc.12":"2020-11-09T16:12:32.618Z","48.0.1-rc.13":"2020-11-09T16:54:55.151Z","48.1.0":"2020-11-09T17:09:36.319Z","48.1.1-rc.1":"2020-11-10T09:13:37.955Z","48.1.1-rc.3":"2020-11-12T12:37:45.163Z","48.1.1-rc.5":"2020-11-13T09:22:18.925Z","48.1.1-rc.7":"2020-11-16T09:39:27.669Z","48.1.1-rc.8":"2020-11-16T10:37:54.917Z","48.1.1":"2020-11-16T11:28:38.241Z","48.1.2-rc.2":"2020-11-16T13:20:47.135Z","48.1.2-rc.3":"2020-11-18T12:52:38.915Z","48.1.2-rc.6":"2020-11-20T23:37:32.684Z","48.1.2-rc.8":"2020-11-25T07:55:06.963Z","48.1.2":"2020-11-25T08:37:38.864Z","48.1.3-rc.1":"2020-11-26T08:24:22.554Z","48.1.3-rc.2":"2020-11-26T08:34:52.856Z","48.1.3-rc.3":"2020-11-26T15:32:22.988Z","48.1.3-rc.4":"2020-11-26T18:44:18.184Z","48.1.3-rc.7":"2020-12-03T17:03:53.163Z","48.1.3-rc.8":"2020-12-03T17:30:38.264Z","48.1.3-rc.11":"2020-12-05T08:28:13.261Z","48.1.3-rc.13":"2020-12-14T14:30:22.996Z","48.1.3":"2020-12-16T10:27:26.782Z","48.1.4-rc.1":"2020-12-18T14:43:00.013Z","48.1.4-rc.4":"2020-12-18T17:47:00.934Z","48.1.4-rc.5":"2021-01-13T12:26:29.196Z","48.1.4-rc.6":"2021-01-15T08:51:26.177Z","48.2.0":"2021-01-15T11:43:05.778Z","48.2.1":"2021-01-20T07:49:52.025Z","48.2.2":"2021-01-22T12:04:38.805Z","48.2.3-rc.3":"2021-01-30T08:09:15.022Z","49.0.0":"2021-02-01T11:36:54.373Z","49.0.1":"2021-02-02T09:06:51.843Z","49.0.2":"2021-02-08T15:34:33.986Z","49.0.3-rc.4":"2021-02-21T09:16:23.136Z","49.0.3-rc.5":"2021-02-22T16:42:03.837Z","49.0.3":"2021-03-09T10:47:43.879Z","49.0.4":"2021-03-10T11:13:24.897Z","49.0.5-rc.3":"2021-03-31T15:16:22.861Z","49.0.5-rc.11":"2021-04-28T12:16:28.695Z","49.0.5-rc.14":"2021-04-28T17:13:07.191Z","49.0.5-rc.17":"2021-04-29T16:56:41.909Z","49.0.5-rc.18":"2021-04-30T09:24:41.632Z","49.0.5-rc.19":"2021-04-30T17:05:00.383Z","49.0.5-rc.20":"2021-05-01T17:53:01.167Z","49.0.5-rc.21":"2021-05-02T09:00:42.645Z","49.0.5-rc.22":"2021-05-04T07:45:17.454Z","49.0.5-rc.24":"2021-05-04T10:57:04.327Z","49.0.5-rc.25":"2021-05-04T11:19:23.299Z","49.0.5-rc.26":"2021-05-04T13:55:57.639Z","49.0.5-rc.27":"2021-05-06T11:43:11.491Z","49.0.5-rc.28":"2021-05-06T14:18:12.619Z","49.0.5-rc.29":"2021-05-07T11:59:20.968Z","49.0.5-rc.30":"2021-05-07T13:39:55.761Z","49.0.5-rc.31":"2021-05-10T11:57:54.315Z","49.0.5-rc.32":"2021-05-10T12:21:16.432Z","50.0.0":"2021-05-10T14:53:23.484Z","50.0.1-rc.1":"2021-05-11T06:09:52.054Z","50.0.1-rc.5":"2021-05-11T20:27:27.323Z","50.0.1-rc.6":"2021-05-13T18:07:00.331Z","50.0.1-rc.7":"2021-05-25T14:40:15.827Z","50.0.1-rc.11":"2021-05-25T16:06:34.206Z","50.1.0":"2021-05-26T09:33:19.488Z","50.1.1-rc.1":"2021-05-26T12:25:11.164Z","50.1.1-rc.3":"2021-06-01T20:39:25.488Z","50.1.1-rc.4":"2021-06-05T06:17:30.095Z","50.1.1":"2021-06-05T06:33:04.971Z","50.1.2-rc.1":"2021-06-10T09:26:50.738Z","50.1.2-rc.2":"2021-06-15T16:49:15.392Z","50.1.2-rc.3":"2021-06-18T08:11:34.189Z","50.1.2-rc.4":"2021-06-18T09:21:13.290Z","50.1.2":"2021-06-18T11:16:12.278Z","50.1.3-rc.1":"2021-06-18T15:58:13.593Z","50.1.3-rc.2":"2021-06-25T15:14:02.601Z","50.1.3-rc.3":"2021-07-01T16:05:55.891Z","50.1.3-rc.6":"2021-07-19T15:31:38.600Z","50.1.3-rc.8":"2021-07-27T09:29:09.659Z","50.1.3-rc.9":"2021-07-27T10:01:24.684Z","50.1.3-rc.11":"2021-07-27T10:39:08.144Z","50.1.3-rc.14":"2021-07-27T12:20:18.911Z","50.1.3-rc.17":"2021-07-27T14:23:53.074Z","51.0.0":"2021-07-27T15:08:04.407Z","51.0.1-rc.1":"2021-07-28T11:30:16.810Z","51.0.1-rc.2":"2021-07-28T12:25:37.449Z","51.0.1-rc.5":"2021-07-28T16:56:49.690Z","51.0.1":"2021-07-30T17:08:37.692Z","51.0.1-rc.7":"2021-07-30T17:31:03.053Z","51.0.2-rc.1":"2021-07-30T18:57:24.473Z","51.0.2-rc.2":"2021-08-04T13:52:52.503Z","51.0.2-rc.3":"2021-08-05T11:48:19.216Z","51.0.2-rc.6":"2021-08-09T16:32:34.134Z","51.0.2-rc.8":"2021-08-10T07:19:33.052Z","51.0.2-rc.10":"2021-08-10T09:09:55.042Z","51.0.2-rc.11":"2021-08-11T09:22:55.720Z","52.0.0":"2021-08-11T15:11:57.450Z","52.0.1-rc.4":"2021-08-12T10:51:07.098Z","52.0.1-rc.5":"2021-08-12T11:07:21.129Z","52.0.1-rc.6":"2021-08-12T14:10:59.053Z","52.0.1-rc.7":"2021-08-16T15:47:25.584Z","52.0.1":"2021-08-17T10:42:44.834Z","52.0.1-rc.9":"2021-08-17T10:52:17.447Z","52.0.1-rc.10":"2021-08-17T11:09:43.145Z","52.0.2-rc.1":"2021-08-17T12:56:08.791Z","52.0.2-rc.4":"2021-08-17T21:56:03.150Z","52.0.2-rc.6":"2021-08-25T07:32:35.762Z","52.0.2-rc.7":"2021-08-25T08:53:03.724Z","52.0.2":"2021-08-25T15:56:25.487Z","52.0.3-rc.2":"2021-08-26T09:48:24.702Z","52.0.3-rc.3":"2021-08-26T11:10:12.911Z","52.0.3-rc.4":"2021-08-26T13:58:24.075Z","52.0.3-rc.5":"2021-08-26T15:43:16.736Z","52.0.3-rc.6":"2021-08-31T13:35:03.735Z","52.0.3-rc.7":"2021-09-02T15:00:05.678Z","52.0.3-rc.8":"2021-09-02T17:39:04.717Z","52.0.3":"2021-09-02T18:19:16.271Z","52.0.4-rc.1":"2021-09-06T11:19:06.152Z","52.0.4-rc.2":"2021-09-06T15:02:12.571Z","52.0.4-rc.4":"2021-09-07T17:03:52.954Z","52.0.4-rc.5":"2021-09-08T09:33:31.407Z","52.0.4-rc.8":"2021-09-14T13:40:22.442Z","52.0.4-rc.11":"2021-09-17T12:50:55.503Z","52.0.4":"2021-09-17T13:24:08.697Z","52.0.5-rc.0":"2021-09-17T13:30:17.053Z","52.0.6-rc.0":"2021-09-17T16:25:35.248Z","52.0.5":"2021-09-17T16:36:07.495Z","52.0.6-rc.1":"2021-09-21T16:10:50.033Z","52.0.6-rc.12":"2021-09-23T06:16:29.143Z","52.0.6-rc.13":"2021-09-23T06:26:35.374Z","52.0.6-rc.14":"2021-09-23T10:47:55.276Z","52.0.6-rc.15":"2021-09-23T12:56:52.046Z","52.0.6-rc.16":"2021-09-23T18:33:14.340Z","52.0.6-rc.17":"2021-09-24T11:20:46.801Z","52.0.6-rc.18":"2021-09-24T12:45:35.530Z","53.0.0":"2021-09-24T12:49:30.491Z","53.0.1-rc.0":"2021-09-24T12:53:39.016Z","53.0.1-rc.1":"2021-09-25T17:26:14.414Z","53.0.1-rc.2":"2021-09-25T18:11:10.962Z","53.0.1-rc.3":"2021-09-27T16:37:30.097Z","53.0.1-rc.5":"2021-09-28T12:00:15.889Z","53.0.1":"2021-09-28T12:03:16.867Z","53.0.2-rc.0":"2021-09-28T12:07:42.256Z","53.0.2-rc.1":"2021-09-30T15:48:53.842Z","53.0.2-rc.2":"2021-09-30T17:39:13.527Z","53.0.2-rc.3":"2021-10-02T12:58:16.103Z","53.0.2-rc.4":"2021-10-08T14:33:03.142Z","53.0.2-rc.5":"2021-11-04T07:26:19.755Z","53.0.2-rc.6":"2021-11-12T11:31:14.839Z","54.0.0":"2021-11-12T11:54:36.695Z","54.0.1-rc.0":"2021-11-12T11:56:09.318Z","54.0.1-rc.1":"2021-11-19T15:42:14.455Z","54.0.1":"2021-11-19T15:46:20.799Z","54.0.2-rc.0":"2021-11-19T15:48:36.798Z","54.0.2-rc.1":"2021-11-19T17:23:36.853Z","54.0.2-rc.2":"2021-11-22T16:17:27.204Z","54.0.2-rc.3":"2021-11-24T09:35:50.650Z","54.0.2":"2021-11-24T09:38:10.427Z","54.0.3-rc.0":"2021-11-24T09:39:42.289Z","54.0.3-rc.1":"2021-12-03T10:52:03.252Z","54.0.3-rc.2":"2021-12-03T13:26:27.886Z","54.0.3-rc.3":"2021-12-03T14:05:35.216Z","54.0.3-rc.4":"2021-12-03T15:01:43.118Z","54.0.3-rc.5":"2021-12-06T10:37:52.537Z","54.0.3-rc.6":"2021-12-06T16:29:02.555Z","54.0.3-rc.7":"2021-12-06T22:23:44.764Z","54.0.3-rc.8":"2021-12-13T11:34:37.783Z","54.0.3-rc.9":"2021-12-13T12:09:40.284Z","54.0.3-rc.11":"2021-12-15T12:50:27.296Z","54.0.3-rc.10":"2021-12-15T12:50:43.056Z","54.0.3-rc.12":"2021-12-15T12:53:05.585Z","54.0.3-rc.13":"2021-12-15T18:25:15.640Z","55.0.0":"2021-12-15T20:27:48.783Z","55.0.1-rc.0":"2021-12-15T20:29:55.323Z","55.0.1-rc.1":"2021-12-16T09:06:51.174Z","55.0.1-rc.2":"2021-12-17T09:57:17.436Z","55.0.1-rc.3":"2022-01-13T18:31:20.831Z","55.0.1-rc.4":"2022-01-20T14:26:37.332Z","55.0.1-rc.5":"2022-01-21T15:46:14.381Z","55.0.1-7fe0da57f.0":"2022-01-26T12:14:07.383Z","55.0.1-5439a0e.0":"2022-01-26T13:07:37.171Z","55.0.1-a6b201af.0":"2022-01-27T15:37:27.458Z","55.0.1-fbe14923.0":"2022-01-27T18:17:29.495Z","55.0.1-6cb3a87e.0":"2022-01-27T19:12:41.812Z","56.0.1-2afef2eb.0":"2022-01-27T20:09:00.470Z","56.0.1-3a5d61d4.0":"2022-01-27T21:33:41.489Z","55.0.1-cca6e321.0":"2022-01-27T23:03:48.382Z","56.0.0":"2022-01-27T23:17:53.976Z","56.0.1-8d260215.0":"2022-01-27T23:53:00.846Z","56.0.1-2c8ec080.0":"2022-01-28T14:56:25.786Z","56.0.1-3a74c110.0":"2022-02-04T16:17:07.820Z","56.0.1-383dc07d.0":"2022-02-04T19:57:13.625Z","56.0.1-709831f6.0":"2022-02-06T16:03:26.977Z","56.0.1":"2022-02-07T16:51:32.147Z","56.0.2-1082fce9.0":"2022-02-18T16:15:00.315Z","56.0.2-125d42ba.0":"2022-03-01T09:46:57.912Z","56.0.2-df1bd1bb.0":"2022-03-01T11:11:13.883Z","56.0.2":"2022-04-05T15:10:15.763Z","56.0.3-e90b8f13.0":"2022-04-05T16:10:05.900Z","56.0.3-8f7ce23c.0":"2022-04-20T12:40:15.409Z","56.0.3":"2022-04-26T07:02:07.272Z","56.0.4-7165bf71.0":"2022-05-16T20:07:55.413Z","56.0.4-4e93dd5d.0":"2022-05-27T13:43:11.192Z","56.0.4-919b27a8.0":"2022-05-27T16:18:36.384Z","57.0.0":"2022-05-30T19:17:22.912Z","57.0.1-ddfb899f.0":"2022-05-30T19:57:00.163Z","57.0.1-764b4adc.0":"2022-06-01T14:26:24.398Z","57.0.1-be025c89.0":"2022-06-01T14:31:34.516Z","57.0.1-87e00a69.0":"2022-06-01T14:36:15.858Z","57.0.1":"2022-06-01T15:16:25.767Z","57.0.2-70e142ac.0":"2022-06-13T16:00:33.830Z","57.0.2-7be50bd1.0":"2022-06-22T17:48:36.634Z","57.0.2":"2022-06-23T12:03:17.099Z","57.0.3-00bd3dd0.0":"2022-06-24T09:30:49.466Z","57.0.3":"2022-06-24T10:25:26.894Z","57.0.4-a05695fc.0":"2022-07-20T13:22:20.012Z","57.0.4-39dbf708.0":"2022-08-17T21:42:57.322Z","57.0.4-8f351a89.0":"2022-08-17T23:18:50.179Z","57.0.4-83f9882e.0":"2022-09-06T11:30:33.025Z","57.0.4-051da161.0":"2022-09-07T12:55:25.662Z","58.0.0":"2022-09-07T13:37:49.493Z","58.0.1-b5456882.0":"2022-09-16T09:24:14.403Z","58.0.1-7c676f63.0":"2022-09-21T19:16:23.328Z","58.0.1-2a830bf5.0":"2022-09-21T20:54:01.536Z","58.0.1-7304a0f4.0":"2022-09-21T20:54:44.122Z","58.0.1":"2022-09-21T21:54:56.833Z","58.0.2-d75e0a39.0":"2022-09-22T08:52:08.908Z","58.0.2-d1b0a8a7.0":"2022-09-22T10:41:45.239Z","58.0.2-acbc1c62.0":"2022-09-22T12:59:51.569Z","58.0.2-dfc43d4e.0":"2022-09-26T14:20:18.399Z","58.0.2-0cee4a4c.0":"2022-10-24T09:13:24.499Z","59.0.0":"2022-10-24T10:47:26.357Z","59.0.1-a77e40cc.0":"2022-10-25T07:11:24.363Z","59.0.1-58e6f468.0":"2022-10-25T08:15:40.041Z","59.0.1-6ae5eb7d.0":"2022-10-28T07:29:48.035Z","59.0.1-6be59068.0":"2022-11-17T19:47:52.368Z","0.0.1-563806f1.0":"2023-01-09T18:11:07.980Z","0.0.1-e85e5b6e.0":"2023-01-09T19:16:02.693Z","0.0.1-2a6fede5.0":"2023-01-10T09:35:50.186Z","59.0.0-5f73ecad":"2023-01-10T17:14:47.991Z","59.0.0-4b4c124c":"2023-01-11T16:06:03.331Z","59.0.0-789ee585":"2023-01-11T17:05:44.119Z","59.0.0-fa578bac":"2023-01-11T17:50:31.307Z","59.0.0-d1c3abb3":"2023-01-11T18:09:07.048Z","60.0.0":"2023-01-12T11:36:44.555Z","60.0.0-6eeb1be5":"2023-01-13T18:20:42.444Z","60.0.0-ab02e8f8":"2023-01-17T12:24:22.176Z","60.0.0-3bcabe38":"2023-01-17T15:31:32.017Z","60.0.0-b64d4af0":"2023-02-01T11:24:25.990Z","60.0.0-e64813f6":"2023-05-24T18:45:47.369Z","60.0.0-4694e806":"2023-05-25T11:31:47.127Z","60.0.0-6d95ce08":"2023-05-25T12:10:37.492Z","60.0.0-7b79c1b8":"2023-05-25T12:46:20.789Z","60.0.1":"2023-05-25T14:59:42.047Z"},"maintainers":[{"email":"alex@achingbrain.net","name":"achingbrain"},{"email":"npm-service-account+ipfs@protocol.ai","name":"npm-service-account-ipfs"}],"description":"A client library for the IPFS HTTP API","homepage":"https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#readme","keywords":["ipfs"],"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-http-client <!-- 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> A client library for the [IPFS HTTP API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) exposed by js-ipfs.\n\n\n> Note: The client library for the [Kubo RPC API](https://docs.ipfs.tech/reference/kubo/rpc/) has moved into [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client).\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Getting Started](#getting-started)\n  - [Next Steps](#next-steps)\n- [Usage](#usage)\n    - [`create([options])`](#createoptions)\n    - [Parameters](#parameters)\n    - [Options](#options)\n    - [Returns](#returns)\n    - [Example](#example)\n  - [API](#api)\n  - [Additional Options](#additional-options)\n  - [Instance Utils](#instance-utils)\n  - [Static Types and Utils](#static-types-and-utils)\n    - [Glob source](#glob-source)\n      - [`globSource(path, pattern, [options])`](#globsourcepath-pattern-options)\n      - [Example](#example-1)\n    - [URL source](#url-source)\n      - [`urlSource(url)`](#urlsourceurl)\n      - [Example](#example-2)\n  - [Running the daemon with the right port](#running-the-daemon-with-the-right-port)\n  - [Importing the module and usage](#importing-the-module-and-usage)\n  - [In a web browser](#in-a-web-browser)\n  - [Custom Headers](#custom-headers)\n  - [Infura Header](#infura-header)\n  - [Global Timeouts](#global-timeouts)\n- [Development](#development)\n  - [Testing](#testing)\n- [Historical context](#historical-context)\n- [License](#license)\n- [Contribute](#contribute)\n\n## Install\n\n```console\n$ npm i ipfs-http-client\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `IpfsHttpClient` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/ipfs-http-client/dist/index.min.js\"></script>\n```\n\n<h1 align=\"center\">\n  <a href=\"https://ipfs.io\"><img width=\"650px\" src=\"https://ipfs.io/ipfs/QmQJ68PFMDdAsgCZvA1UVzzn18asVcf7HVvCDgpjiSCAse\" alt=\"IPFS http client lib logo\" /></a>\n</h1>\n\n<h3 align=\"center\">The JavaScript HTTP RPC API client library for js-ipfs.</h3>\n\n<p align=\"center\">\n  <a href=\"https://riot.im/app/#/room/#ipfs-dev:matrix.org\"><img src=\"https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat\" /> </a>\n  <a href=\"http://webchat.freenode.net/?channels=%23ipfs\"><img src=\"https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat\" /></a>\n  <a href=\"https://github.com/ipfs/team-mgmt/blob/master/MGMT_JS_CORE_DEV.md\"><img src=\"https://img.shields.io/badge/team-mgmt-blue.svg?style=flat\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_shield\" alt=\"FOSSA Status\"><img src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fipfs%2Fjs-ipfs.svg?type=shield\"/></a>\n  <a href=\"https://travis-ci.com/ipfs/js-ipfs\"><img src=\"https://flat.badgen.net/travis/ipfs/js-ipfs\" /></a>\n  <a href=\"https://codecov.io/gh/ipfs/js-ipfs-http-client\"><img src=\"https://img.shields.io/codecov/c/github/ipfs/js-ipfs-http-client/master.svg?style=flat-square\"></a>\n   <a href=\"https://bundlephobia.com/result?p=ipfs-http-client\"><img src=\"https://flat.badgen.net/bundlephobia/minzip/ipfs-http-client\"></a>\n  <br>\n  <a href=\"https://david-dm.org/ipfs/js-ipfs?path=packages/ipfs-http-client\"><img src=\"https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square&path=packages/ipfs-http-client\" /></a>\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\"></a>\n  <a href=\"https://github.com/RichardLitt/standard-readme\"><img src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"\"><img src=\"https://img.shields.io/badge/Node.js-%3E%3D10.0.0-orange.svg?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/ipfs-http-client\"><img src=\"https://img.shields.io/npm/dm/ipfs-http-client.svg\" /></a>\n  <a href=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"><img src=\"https://data.jsdelivr.com/v1/package/npm/ipfs-http-client/badge\"/></a>\n  <br>\n</p>\n\n## Getting Started\n\nWe've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..\n\n```bash\nnpm install --save ipfs-http-client\n```\n\nBoth the Current and Active LTS versions of Node.js are supported. Please see [nodejs.org](https://nodejs.org/) for what these currently are.\n\n### Next Steps\n\n- Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)\n- Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples) to learn how to spawn an IPFS node in Node.js and in the Browser\n- Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node\n- Visit <https://dweb-primer.ipfs.io> to learn about IPFS and the concepts that underpin it\n- Head over to <https://proto.school> to take interactive tutorials that cover core IPFS APIs\n- Check out <https://docs.ipfs.io> for tips, how-tos and more\n- See <https://blog.ipfs.io> for news and more\n- Need help? Please ask 'How do I?' questions on <https://discuss.ipfs.io>\n\n## Usage\n\n#### `create([options])`\n\n> create an instance of the HTTP API client\n\n#### Parameters\n\nNone\n\n#### Options\n\n`options` can be a `String`, a `URL` or a `Multiaddr` which will be interpreted as the address of the IPFS node we wish to use the API of.\n\nAlternatively it can be an object which may have the following keys:\n\n| Name     | Type                                                                 | Default                                          | Description                                                                                                    |\n| -------- | -------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |\n| url      | `String` or `URL` or `Multiaddr`                                     | `'http://localhost:5001/api/v0'`                 | A URL that resolves to a running instance of the IPFS [HTTP RPC API](https://docs.ipfs.io/reference/http/api/) |\n| protocol | `String`                                                             | `'http'`                                         | The protocol to used (ignored if url is specified)                                                             |\n| host     | `String`                                                             | `'localhost'`                                    | The host to used (ignored if url is specified)                                                                 |\n| port     | `number`                                                             | `5001`                                           | The port to used (ignored if url is specified)                                                                 |\n| path     | `String`                                                             | `'api/v0'`                                       | The path to used (ignored if url is specified)                                                                 |\n| agent    | [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) | `http.Agent({ keepAlive: true, maxSockets: 6 })` | An `http.Agent` used to control client behaviour (node.js only)                                                |\n\n#### Returns\n\n| Type     | Description                                                                                               |\n| -------- | --------------------------------------------------------------------------------------------------------- |\n| `Object` | An object that conforms to the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) |\n\n#### Example\n\n```JavaScript\nimport { create } from 'ipfs-http-client'\n\n// connect to the default API address http://localhost:5001\nconst client = create()\n\n// connect to a different API\nconst client = create({ url: \"http://127.0.0.1:5002/api/v0\" });\n\n// connect using a URL\nconst client = create(new URL('http://127.0.0.1:5002'))\n\n// call Core API methods\nconst { cid } = await client.add('Hello world!')\n```\n\n### API\n\n[![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core)\n\n> `js-ipfs-http-client` implements the [IPFS Core API](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) - please follow the previous link to see the methods available.\n\n### Additional Options\n\nAll core API methods take *additional* `options` specific to the HTTP API:\n\n- `headers` - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options.\n- `searchParams` - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request.\n\n### Instance Utils\n\n- `ipfs.getEndpointConfig()`\n\nCall this on your client instance to return an object containing the `host`, `port`, `protocol` and `api-path`.\n\n### Static Types and Utils\n\nAside from the default export, `ipfs-http-client` exports various types and utilities that are included in the bundle:\n\n- [`multiaddr`](https://www.npmjs.com/package/multiaddr)\n- [`multibase`](https://www.npmjs.com/package/multibase)\n- [`multicodec`](https://www.npmjs.com/package/multicodec)\n- [`multihash`](https://www.npmjs.com/package/multihashes)\n- [`CID`](https://www.npmjs.com/package/cids)\n- [`globSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/glob-source.js) (not available in the browser)\n- [`urlSource`](https://github.com/ipfs/js-ipfs-utils/blob/master/src/files/url-source.js)\n\nThese can be accessed like this, for example:\n\n```js\nconst { CID } = require('ipfs-http-client')\n// ...or from an es-module:\nimport { CID } from 'ipfs-http-client'\n```\n\n#### Glob source\n\nA utility to allow files on the file system to be easily added to IPFS.\n\n##### `globSource(path, pattern, [options])`\n\n- `path`: A path to a single file or directory to glob from\n- `pattern`: A pattern to match files under `path`\n- `options`: Optional options\n- `options.hidden`: Hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, globSource } from 'ipfs'\n\nconst ipfs = await create()\n\nfor await (const file of ipfs.addAll(globSource('./docs', '**/*'))) {\n  console.log(file)\n}\n/*\n{\n  path: 'docs/assets/anchor.js',\n  cid: CID('QmVHxRocoWgUChLEvfEyDuuD6qJ4PhdDL2dTLcpUy3dSC2'),\n  size: 15347\n}\n{\n  path: 'docs/assets/bass-addons.css',\n  cid: CID('QmPiLWKd6yseMWDTgHegb8T7wVS7zWGYgyvfj7dGNt2viQ'),\n  size: 232\n}\n...\n*/\n```\n\n#### URL source\n\nA utility to allow content from the internet to be easily added to IPFS.\n\n##### `urlSource(url)`\n\n- `url`: A string URL or [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) instance to send HTTP GET request to\n\nReturns an async iterable that yields `{ path, content }` objects suitable for passing to `ipfs.add`.\n\n##### Example\n\n```js\nimport { create, urlSource } from 'ipfs-http-client'\nconst ipfs = create()\n\nconst file = await ipfs.add(urlSource('https://ipfs.io/images/ipfs-logo.svg'))\nconsole.log(file)\n\n/*\n{\n  path: 'ipfs-logo.svg',\n  cid: CID('QmTqZhR6f7jzdhLgPArDPnsbZpvvgxzCZycXK7ywkLxSyU'),\n  size: 3243\n}\n*/\n```\n\n### Running the daemon with the right port\n\nTo interact with the API, you need to have a local daemon running. It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.\n\n```sh\n# Show the ipfs config API port to check it is correct\n> ipfs config Addresses.API\n/ip4/127.0.0.1/tcp/5001\n# Set it if it does not match the above output\n> ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001\n# Restart the daemon after changing the config\n\n# Run the daemon\n> ipfs daemon\n```\n\n### Importing the module and usage\n\n```javascript\nimport { create } from 'ipfs-http-client'\n\n// connect to ipfs daemon API server\nconst ipfs = create('http://localhost:5001') // (the default in Node.js)\n\n// or connect with multiaddr\nconst ipfs = create('/ip4/127.0.0.1/tcp/5001')\n\n// or using options\nconst ipfs = create({ host: 'localhost', port: '5001', protocol: 'http' })\n\n// or specifying a specific API path\nconst ipfs = create({ host: '1.1.1.1', port: '80', apiPath: '/ipfs/api/v0' })\n```\n\n### In a web browser\n\n**through Browserify**\n\nSame as in Node.js, you just have to [browserify](http://browserify.org) the code before serving it. See the browserify repo for how to do that.\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples) to get a boilerplate.\n\n**through webpack**\n\nSee the example in the [examples folder](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/http-client-bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack.\n\n**from CDN**\n\nInstead of a local installation (and browserification) you may request a remote copy of IPFS API from [jsDelivr](https://www.jsdelivr.com/package/npm/ipfs).\n\nTo always request the latest version, use one of the following examples:\n\n```html\n<!-- loading the minified version using jsDelivr -->\n<script src=\"https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js\"></script>\n```\n\nFor maximum security you may also decide to:\n\n- reference a specific version of IPFS API (to prevent unexpected breaking changes when a newer latest version is published)\n- [generate a SRI hash](https://www.srihash.org/) of that version and use it to ensure integrity. Learn more also at the [jsdelivr website](https://www.jsdelivr.com/using-sri-with-dynamic-files)\n- set the [CORS settings attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) to make anonymous requests to CDN\n\nExample:\n\n```html\n<script\n  src=\"https://www.jsdelivr.com/package/npm/ipfs-http-client\"\n  integrity=\"sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nCDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example:\n\n```js\nconst ipfs = window.IpfsHttpClient({ host: 'localhost', port: 5001 })\n```\n\nIf you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways:\n\n```js\nconst ipfs = window.IpfsHttpClient()\n```\n\n### Custom Headers\n\nIf you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst ipfs = create({\n  host: 'localhost',\n  port: 5001,\n  protocol: 'http',\n  headers: {\n    authorization: 'Bearer ' + TOKEN\n  }\n})\n```\n\n### Infura Header\n\nIf you wish to send infura headers with each request made by this library, for example, the Authorization header. You can use the config to do so:\n\n```js\nconst auth =\n    'Basic ' + Buffer.from(INFURA_ID + ':' + INFURA_SECRET_KEY).toString('base64');\nconst client = ipfsClient.create({\n    host: 'ipfs.infura.io',\n    port: 5001,\n    protocol: 'https',\n    headers: {\n        authorization: auth,\n    },\n});\n```\n\n### Global Timeouts\n\nTo set a global timeout for *all* requests pass a value for the `timeout` option:\n\n```js\n// Timeout after 10 seconds\nconst ipfs = create({ timeout: 10000 })\n// Timeout after 2 minutes\nconst ipfs = create({ timeout: '2m' })\n// see https://www.npmjs.com/package/parse-duration for valid string values\n```\n\n## Development\n\n### Testing\n\nWe run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).\n\n## Historical context\n\nThis module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.\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","readmeFilename":"README.md"}