@chainsafe/libp2p-noise

![npm](https://img.shields.io/npm/v/libp2p-noise) [![CI](https://github.com/ChainSafe/js-libp2p-noise/actions/workflows/ci.yml/badge.svg?branch=master&event=push)](https://github.com/ChainSafe/js-libp2p-noise/actions/workflows/ci.yml)

critical bug fixex in >=5.0.3
Last updated 3 years ago by mpetrunic .
MIT · Repository · Original npm · Tarball · package.json
$ npm install @chainsafe/libp2p-noise 
SYNC missed versions from official npm registry.

@chainsafe/libp2p-noise

npm License Apache 2.0 License MIT Twitter Discord

Noise libp2p handshake for js-libp2p

About

This repository contains TypeScript implementation of noise protocol, an encryption protocol used in libp2p.

Usage

Install with yarn add @chainsafe/libp2p-noise or npm i @chainsafe/libp2p-noise.

Example of using default noise configuration and passing it to the libp2p config:

import {createLibp2p} from "libp2p"
import {noise} from "@chainsafe/libp2p-noise"

//custom noise configuration, pass it instead of `noise()`
//x25519 private key
const n = noise({ staticNoiseKey });

const libp2p = await createLibp2p({
  connectionEncrypters: [noise()],
  //... other options
})

See the NoiseInit interface for noise configuration options.

API

This module exposes an implementation of the ConnectionEncrypter interface.

Bring your own crypto

You can provide a custom crypto implementation (instead of the default, based on @noble) by adding a crypto field to the init argument passed to the Noise factory.

The implementation must conform to the ICryptoInterface, defined in https://github.com/ChainSafe/js-libp2p-noise/blob/master/src/crypto.ts

Install

$ npm i @chainsafe/libp2p-noise

Browser <script> tag

Loading this module through a script tag will make its exports available as ChainsafeLibp2pNoise in the global namespace.

<script src="https://unpkg.com/@chainsafe/libp2p-noise/dist/index.min.js"></script>

API Docs

License

Licensed under either of

Contribution

Unless 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.

Current Tags

  • 16.0.0                                ...           latest (3 months ago)

45 Versions

  • 16.0.0                                ...           3 months ago
  • 15.1.2                                ...           4 months ago
  • 15.1.1                                ...           4 months ago
  • 15.1.0                                ...           6 months ago
  • 15.0.0                                ...           a year ago
  • 14.1.0                                ...           a year ago
  • 14.0.0                                ...           a year ago
  • 13.0.5                                ...           a year ago
  • 13.0.4                                ...           a year ago
  • 13.0.3                                ...           a year ago
  • 13.0.2                                ...           a year ago
  • 13.0.1                                ...           a year ago
  • 13.0.0                                ...           a year ago
  • 12.0.2                                ...           a year ago
  • 12.0.1                                ...           2 years ago
  • 12.0.0                                ...           2 years ago
  • 11.0.4                                ...           2 years ago
  • 11.0.2                                ...           2 years ago
  • 11.0.1                                ...           2 years ago
  • 11.0.0                                ...           2 years ago
  • 10.2.0                                ...           2 years ago
  • 10.1.0                                ...           2 years ago
  • 10.0.1                                ...           2 years ago
  • 10.0.0                                ...           2 years ago
  • 9.0.0                                ...           2 years ago
  • 8.0.2                                ...           2 years ago
  • 8.0.1                                ...           2 years ago
  • 8.0.0                                ...           2 years ago
  • 7.0.3                                ...           2 years ago
  • 7.0.2                                ...           2 years ago
  • 7.0.1                                ...           3 years ago
  • 7.0.0                                ...           3 years ago
  • 6.2.0                                ...           3 years ago
  • 6.1.1                                ...           3 years ago
  • 6.1.0                                ...           3 years ago
  • 6.0.1                                ...           3 years ago
  • 6.0.0                                ...           3 years ago
  • 4.1.2                                ...           3 years ago
  • 5.0.3                                ...           3 years ago
  • 5.0.2 [deprecated]           ...           3 years ago
  • 5.0.1 [deprecated]           ...           3 years ago
  • 5.0.0 [deprecated]           ...           3 years ago
  • 4.1.1 [deprecated]           ...           3 years ago
  • 4.1.0 [deprecated]           ...           3 years ago
  • 4.0.0 [deprecated]           ...           3 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (13)
Dev Dependencies (10)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE