{"name":"@chainsafe/libp2p-noise","version":"17.0.0","keywords":["crypto","libp2p","noise"],"author":{"name":"ChainSafe","email":"info@chainsafe.io"},"license":"Apache-2.0 OR MIT","_id":"@chainsafe/libp2p-noise@17.0.0","maintainers":[{"name":"wemeetagain","email":"caymannava@gmail.com"}],"homepage":"https://github.com/ChainSafe/js-libp2p-noise#readme","bugs":{"url":"https://github.com/ChainSafe/js-libp2p-noise/issues"},"dist":{"shasum":"9bd690b414716a81531d66942206b893ef9bca2b","tarball":"http://registry-npm.ywwl.com/@chainsafe/libp2p-noise/download/@chainsafe/libp2p-noise-17.0.0.tgz","fileCount":91,"integrity":"sha512-vwrmY2Y+L1xYhIDiEpl61KHxwrLCZoXzTpwhyk34u+3+6zCAZPL3GxH3i2cs+u5IYNoyLptORdH17RKFXy7upA==","signatures":[{"sig":"MEYCIQC5CI8BRC2kukjK4wTahOh7FrM25ddNwDTggmY2Pf5GDAIhAI/i2rKa6q4tHOGotpNvLCDk1zUpizeWarFjwDTEfsQb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chainsafe%2flibp2p-noise@17.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1231931,"size":316721,"noattachment":false,"key":"/@chainsafe/libp2p-noise/-/@chainsafe/libp2p-noise-17.0.0.tgz"},"type":"module","types":"./dist/src/index.d.ts","browser":{"./dist/src/crypto/index.js":"./dist/src/crypto/index.browser.js"},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"},"./crypto":{"types":"./dist/src/crypto/index.d.ts","import":"./dist/src/crypto/index.js"}},"gitHead":"aa8247f35005312a0cf32dd53952cbaa8d7cb68e","release":{"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"release":"major","breaking":true},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]],"branches":["master"]},"scripts":{"docs":"aegir docs","lint":"aegir lint","test":"aegir test","bench":"node benchmarks/benchmark.js","build":"aegir build","clean":"aegir clean","release":"aegir release","lint:fix":"aegir lint --fix","dep-check":"aegir dep-check","proto:gen":"protons ./src/proto/payload.proto","test:node":"aegir test -t node","prepublish":"npm run build","test:browser":"aegir test -t browser -t webworker","test:interop":"aegir test -t node -f dist/test/interop.js","test:electron-main":"aegir test -t electron-main"},"_npmUser":{"name":"wemeetagain","email":"caymannava@gmail.com"},"repository":{"url":"git+https://github.com/ChainSafe/js-libp2p-noise.git","type":"git"},"_npmVersion":"10.9.3","description":"Noise libp2p handshake for js-libp2p","directories":{},"_nodeVersion":"22.19.0","dependencies":{"wherearewe":"^2.0.1","uint8arrays":"^5.1.0","@libp2p/utils":"^7.0.0","@noble/curves":"^2.0.1","@noble/hashes":"^2.0.1","@libp2p/crypto":"^5.1.9","@noble/ciphers":"^2.0.1","uint8arraylist":"^2.4.8","@libp2p/peer-id":"^6.0.0","protons-runtime":"^5.6.0","@libp2p/interface":"^3.0.0","@chainsafe/as-sha256":"^1.2.0","@chainsafe/as-chacha20poly1305":"^0.1.0"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^47.0.22","execa":"^9.6.0","sinon":"^21.0.0","libp2p":"^3.0.0","mkdirp":"^3.0.1","it-pair":"^2.0.6","p-defer":"^4.0.1","protons":"^7.7.0","sinon-ts":"^2.0.0","benchmark":"^2.1.4","go-libp2p":"^1.6.0","@libp2p/tcp":"^11.0.0","@types/sinon":"^17.0.4","multiformats":"^13.4.0","@libp2p/logger":"^6.0.0","@libp2p/interop":"^14.0.0","iso-random-stream":"^2.0.2","@libp2p/daemon-client":"^10.0.0","@libp2p/daemon-server":"^9.0.0","@chainsafe/libp2p-yamux":"^8.0.0","@multiformats/multiaddr":"^13.0.1","@libp2p/interface-compliance-tests":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/libp2p-noise_17.0.0_1758804023133_0.4565561091858137","host":"s3://npm-registry-packages-npm-production"},"readme":"# @chainsafe/libp2p-noise\n\n![npm](https://img.shields.io/npm/v/@chainsafe/libp2p-noise)\n[![](https://img.shields.io/github/actions/workflow/status/ChainSafe/js-libp2p-noise/js-test-and-release.yml?branch=master)](https://github.com/ChainSafe/js-libp2p-noise/actions)\n[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](https://libp2p.io/)\n![](https://img.shields.io/github/issues-raw/ChainSafe/js-libp2p-noise)\n[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![License MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![](https://img.shields.io/badge/npm-%3E%3D7.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/Node.js-%3E%3D16.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/browsers-last%202%20versions%2C%20not%20ie%20%3C%3D11-orange)\n[![Twitter](https://img.shields.io/twitter/follow/ChainSafeth.svg?label=Twitter)](https://twitter.com/ChainSafeth)\n[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord\\&logo=discord)](https://discord.gg/Q6A3YA2)\n\n> Noise libp2p handshake for js-libp2p\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nThis repository contains TypeScript implementation of noise protocol, an encryption protocol used in libp2p.\n\n## Usage\n\nInstall with `yarn add @chainsafe/libp2p-noise` or `npm i @chainsafe/libp2p-noise`.\n\nExample of using default noise configuration and passing it to the libp2p config:\n\n```ts\nimport {createLibp2p} from \"libp2p\"\nimport {noise} from \"@chainsafe/libp2p-noise\"\n\n//custom noise configuration, pass it instead of `noise()`\n//x25519 private key\nconst n = noise({ staticNoiseKey });\n\nconst libp2p = await createLibp2p({\n  connectionEncrypters: [noise()],\n  //... other options\n})\n```\n\nSee the [NoiseInit](https://github.com/ChainSafe/js-libp2p-noise/blob/master/src/noise.ts#L22-L30) interface for noise configuration options.\n\n## API\n\nThis module exposes an implementation of the [ConnectionEncrypter](https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.ConnectionEncrypter.html) interface.\n\n## Bring your own crypto\n\nYou can provide a custom crypto implementation (instead of the default, based on [@noble](https://paulmillr.com/noble/)) by adding a `crypto` field to the init argument passed to the `Noise` factory.\n\nThe implementation must conform to the `ICryptoInterface`, defined in <https://github.com/ChainSafe/js-libp2p-noise/blob/master/src/crypto.ts>\n\n# Install\n\n```console\n$ npm i @chainsafe/libp2p-noise\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `ChainsafeLibp2pNoise` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/@chainsafe/libp2p-noise/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://ChainSafe.github.io/js-libp2p-noise>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/ChainSafe/js-libp2p-noise/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/ChainSafe/js-libp2p-noise/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\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","publish_time":1758804023408,"_cnpm_publish_time":1758804023408,"dist-tags":{"latest":"17.0.0"}}