{"id":14483638,"url":"https://github.com/ChainSafe/js-libp2p-noise","last_synced_at":"2025-08-30T04:31:37.281Z","repository":{"id":37091357,"uuid":"218509240","full_name":"ChainSafe/js-libp2p-noise","owner":"ChainSafe","description":"Noise libp2p handshake for js-libp2p","archived":false,"fork":false,"pushed_at":"2025-08-27T04:35:37.000Z","size":3091,"stargazers_count":39,"open_issues_count":5,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-29T10:04:46.526Z","etag":null,"topics":["encryption","javascript","libp2p","network","noise"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChainSafe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-30T11:12:37.000Z","updated_at":"2025-07-16T04:15:43.000Z","dependencies_parsed_at":"2023-12-16T06:40:10.096Z","dependency_job_id":"2d5409f0-0c30-4367-9b63-18a58c50fc2d","html_url":"https://github.com/ChainSafe/js-libp2p-noise","commit_stats":{"total_commits":529,"total_committers":29,"mean_commits":18.24137931034483,"dds":0.718336483931947,"last_synced_commit":"f0640b90a506896ec3cbb8089a779e167e4d1d19"},"previous_names":["nodefactoryio/js-libp2p-noise"],"tags_count":77,"template":false,"template_full_name":null,"purl":"pkg:github/ChainSafe/js-libp2p-noise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fjs-libp2p-noise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fjs-libp2p-noise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fjs-libp2p-noise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fjs-libp2p-noise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChainSafe","download_url":"https://codeload.github.com/ChainSafe/js-libp2p-noise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChainSafe%2Fjs-libp2p-noise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272680464,"owners_count":24975267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encryption","javascript","libp2p","network","noise"],"created_at":"2024-09-03T00:01:56.256Z","updated_at":"2025-08-30T04:31:36.989Z","avatar_url":"https://github.com/ChainSafe.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"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\\\u0026logo=discord)](https://discord.gg/Q6A3YA2)\n\n\u003e Noise libp2p handshake for js-libp2p\n\n# About\n\n\u003c!--\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--\u003e\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 \u003chttps://github.com/ChainSafe/js-libp2p-noise/blob/master/src/crypto.ts\u003e\n\n# Install\n\n```console\n$ npm i @chainsafe/libp2p-noise\n```\n\n## Browser `\u003cscript\u003e` tag\n\nLoading this module through a script tag will make its exports available as `ChainsafeLibp2pNoise` in the global namespace.\n\n```html\n\u003cscript src=\"https://unpkg.com/@chainsafe/libp2p-noise/dist/index.min.js\"\u003e\u003c/script\u003e\n```\n\n# API Docs\n\n- \u003chttps://ChainSafe.github.io/js-libp2p-noise\u003e\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/ChainSafe/js-libp2p-noise/LICENSE-APACHE) / \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT ([LICENSE-MIT](https://github.com/ChainSafe/js-libp2p-noise/LICENSE-MIT) / \u003chttp://opensource.org/licenses/MIT\u003e)\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChainSafe%2Fjs-libp2p-noise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChainSafe%2Fjs-libp2p-noise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChainSafe%2Fjs-libp2p-noise/lists"}