{"_id":"libp2p-connection","_rev":"4665285","name":"libp2p-connection","description":"JS Libp2p connections","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"jacobheun","email":""},{"name":"vascosantos","email":"santos.vasco10@gmail.com"}],"time":{"modified":"2026-04-10T22:37:00.000Z","created":"2021-11-03T16:10:10.840Z","0.3.1":"2022-01-02T15:55:58.360Z","0.3.0":"2022-01-02T08:05:49.081Z","0.2.0":"2021-12-02T07:03:00.779Z","0.1.0":"2021-11-22T17:27:54.490Z","0.0.0":"2021-11-03T16:10:10.840Z"},"users":{},"author":"","repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"versions":{"0.3.1":{"name":"libp2p-connection","version":"0.3.1","description":"JS Libp2p connections","type":"module","types":"dist/src/index.d.ts","typesVersions":{"*":{"*":["*","*/index","dist/src/*","dist/src/*/index"]}},"eslintConfig":{"extends":"ipfs"},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check dist/src/**/*.js","pretest":"npm run build","build":"tsc","test":"aegir test -f ./dist/test/*.js"},"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"keywords":["libp2p","interface"],"author":"","license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-connection#readme","dependencies":{"err-code":"^3.0.1","libp2p-interfaces":"^3.1.1","multiaddr":"^10.0.1"},"devDependencies":{"aegir":"^36.0.0","libp2p-peer-id-factory":"^0.2.1"},"exports":{".":{"import":"./dist/src/index.js","types":"./dist/src/index.d.ts"},"./status":{"import":"./dist/src/status.js","types":"./dist/src/status.d.ts"}},"gitHead":"d9c20773f1b391b9f8045ac8e36d75e843e0763a","_id":"libp2p-connection@0.3.1","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"shasum":"dc4ab9d78bed1d15a7d5bc46717e4511785465d6","size":22536,"noattachment":false,"key":"/libp2p-connection/-/libp2p-connection-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/libp2p-connection/download/libp2p-connection-0.3.1.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"jacobheun","email":""},{"name":"vascosantos","email":"santos.vasco10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-connection_0.3.1_1641138958189_0.231605029332983"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-02T15:56:04.564Z","publish_time":1641138958360,"_cnpm_publish_time":1641138958360},"0.3.0":{"name":"libp2p-connection","version":"0.3.0","description":"JS Libp2p connections","type":"module","types":"dist/src/index.d.ts","typesVersions":{"*":{"*":["*","*/index","dist/src/*","dist/src/*/index"]}},"eslintConfig":{"extends":"ipfs"},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check dist/src/**/*.js","pretest":"npm run build","build":"tsc","test":"aegir test -f ./dist/test/*.js"},"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"keywords":["libp2p","interface"],"author":"","license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-connection#readme","dependencies":{"err-code":"^3.0.1","libp2p-interfaces":"^3.1.0","multiaddr":"^10.0.1"},"devDependencies":{"aegir":"^36.0.0","libp2p-peer-id-factory":"^0.2.0"},"exports":{".":{"import":"./dist/src/index.js","types":"./dist/src/index.d.ts"},"./status":{"import":"./dist/src/status.js","types":"./dist/src/status.d.ts"}},"gitHead":"befb411101eae7eb3711405cec0c1b74a2487e33","_id":"libp2p-connection@0.3.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"shasum":"955581cd8cca7ca6bff3661cb25481ec39d4db4f","size":22539,"noattachment":false,"key":"/libp2p-connection/-/libp2p-connection-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/libp2p-connection/download/libp2p-connection-0.3.0.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"jacobheun","email":""},{"name":"vascosantos","email":"santos.vasco10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-connection_0.3.0_1641110748835_0.18298397237336617"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-02T08:06:01.080Z","publish_time":1641110749081,"_cnpm_publish_time":1641110749081},"0.2.0":{"name":"libp2p-connection","version":"0.2.0","description":"JS Libp2p connections","type":"module","types":"dist/src/index.d.ts","typesVersions":{"*":{"*":["*","*/index","dist/src/*","dist/src/*/index"]}},"eslintConfig":{"extends":"ipfs"},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check dist/src/**/*.js","pretest":"npm run build","build":"tsc","test":"aegir test -f ./dist/test/*.js"},"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"keywords":["libp2p","interface"],"author":"","license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-connection#readme","dependencies":{"err-code":"^3.0.1","libp2p-interfaces":"^3.0.0","multiaddr":"^10.0.1","peer-id":"^0.16.0"},"devDependencies":{"aegir":"^36.0.0"},"exports":{".":{"import":"./dist/src/index.js","types":"./dist/src/index.d.ts"},"./status":{"import":"./dist/src/status.js","types":"./dist/src/status.d.ts"}},"gitHead":"18a07830eaa810c42694f49be943ce18e77ae869","_id":"libp2p-connection@0.2.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","dist":{"shasum":"fd46c446cbdaae6a9efb2fa985edd7b54b1be2cf","size":22489,"noattachment":false,"key":"/libp2p-connection/-/libp2p-connection-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/libp2p-connection/download/libp2p-connection-0.2.0.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"jacobheun","email":""},{"name":"vascosantos","email":"santos.vasco10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-connection_0.2.0_1638428580548_0.8457867194154176"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-28T00:21:52.254Z","publish_time":1638428580779,"_cnpm_publish_time":1638428580779},"0.1.0":{"name":"libp2p-connection","version":"0.1.0","description":"JS Libp2p connections","type":"module","types":"dist/src/index.d.ts","typesVersions":{"*":{"*":["*","*/index","dist/src/*","dist/src/*/index"]}},"eslintConfig":{"extends":"ipfs"},"scripts":{"lint":"aegir lint","dep-check":"aegir dep-check dist/src/**/*.js","pretest":"npm run build","build":"tsc","test":"aegir test -f ./dist/test/*.js"},"repository":{"type":"git","url":"git+https://github.com/libp2p/js-libp2p-interfaces.git"},"keywords":["libp2p","interface"],"author":"","license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-connection#readme","dependencies":{"err-code":"^3.0.1","libp2p-interfaces":"^2.0.0","multiaddr":"^10.0.1","peer-id":"^0.15.3"},"devDependencies":{"aegir":"^36.0.0"},"exports":{".":{"import":"./dist/src/index.js","types":"./dist/src/index.d.ts"},"./status":{"import":"./dist/src/status.js","types":"./dist/src/status.d.ts"}},"gitHead":"045f7d77535ee61562af0b0e2a7dfd168b214430","_id":"libp2p-connection@0.1.0","_nodeVersion":"16.11.1","_npmVersion":"lerna/4.0.0/node@v16.11.1+x64 (darwin)","dist":{"shasum":"a55d6334a7e27a0a42fb3c6831ddf9df1e82587c","size":22494,"noattachment":false,"key":"/libp2p-connection/-/libp2p-connection-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/libp2p-connection/download/libp2p-connection-0.1.0.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"jacobheun","email":""},{"name":"vascosantos","email":"santos.vasco10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-connection_0.1.0_1637602074336_0.07472387915404655"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-28T00:21:51.194Z","publish_time":1637602074490,"_cnpm_publish_time":1637602074490},"0.0.0":{"name":"libp2p-connection","version":"0.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","_id":"libp2p-connection@0.0.0","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"shasum":"1b335c744eacf3f23143f3410e4e577e0a71618f","size":243,"noattachment":false,"key":"/libp2p-connection/-/libp2p-connection-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/libp2p-connection/download/libp2p-connection-0.0.0.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"jacobheun","email":""},{"name":"vascosantos","email":"santos.vasco10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libp2p-connection_0.0.0_1635955810693_0.11916881413398639"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-28T00:21:50.090Z","publish_time":1635955810840,"_cnpm_publish_time":1635955810840}},"readme":"# libp2p-connection <!-- omit in toc -->\n\n> Contains an implementation of the [Connection](https://github.com/libp2p/js-libp2p-interfaces/blob/master/packages/libp2p-interfaces/src/connection/index.ts) interface\n\n## Table of contents <!-- omit in toc -->\n\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Usage\n\n```console\nnpm i libp2p-connection\n```\n\n```javascript\nimport { Connection } from 'libp2p-connection'\n\nconst connection = new Connection({ ... })\nconst stream = connection.newStream([ '/my-protocol/v1.0.0' ])\n```\n\n## Contribute\n\nThe libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out:\n\n - Go through the modules and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.\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.\n\n## License\n\n[Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT) © Protocol Labs","_attachments":{},"homepage":"https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-connection#readme","bugs":{"url":"https://github.com/libp2p/js-libp2p-interfaces/issues"},"license":"(Apache-2.0 OR MIT)"}