mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-26 05:42:26 +00:00
Merge pull request #28 from NodeFactoryIo/mpetrunic/release-1.0.0-rc
Release 1.0.0-rc1
This commit is contained in:
commit
7e96ebbcf9
@ -1,6 +1,6 @@
|
|||||||
# js-libp2p-noise
|
# js-libp2p-noise
|
||||||
|
|
||||||

|

|
||||||
[](https://travis-ci.com/NodeFactoryIo/js-libp2p-noise)
|
[](https://travis-ci.com/NodeFactoryIo/js-libp2p-noise)
|
||||||
|
|
||||||
[](https://libp2p.io/)
|
[](https://libp2p.io/)
|
||||||
@ -17,13 +17,14 @@ This repository contains TypeScript implementation of noise protocol, an encrypt
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
When published, package should be imported as: `import { Noise } from 'libp2p-noise'`.
|
Install with `yarn add libp2p-noise` or `npm i libp2p-noise`.
|
||||||
|
|
||||||
Example of using default noise configuration and passing it to the libp2p config:
|
Example of using default noise configuration and passing it to the libp2p config:
|
||||||
```
|
```
|
||||||
import {NOISE, Noise} from "@nodefactory/js-libp2p-noise"
|
import {NOISE, Noise} from "libp2p-noise"
|
||||||
|
|
||||||
//custom noise configuration, pass it instead of NOISE object
|
|
||||||
|
//custom noise configuration, pass it instead of NOISE instance
|
||||||
const noise = new Noise(privateKey, Buffer.alloc(), false);
|
const noise = new Noise(privateKey, Buffer.alloc(), false);
|
||||||
|
|
||||||
const libp2p = new Libp2p({
|
const libp2p = new Libp2p({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "js-libp2p-noise",
|
"name": "libp2p-noise",
|
||||||
"version": "1.0.0-rc",
|
"version": "1.0.0-rc1",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "lib/index.js",
|
"module": "lib/index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user