webpeerjs 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # WebPEER.js
2
2
  > Decentralized P2P JS library for communication between applications in browser.
3
3
 
4
- [WebPEER.js](https://github.com/nuzulul/webpeerjs) enables browser to browser connectivity without a central server. Build completely peer-to-peer web applications, no trackers or relay servers required. Connecting projects safely, privately, and reliably.
4
+ [WebPEER.js](https://github.com/nuzulul/webpeerjs) enables browser to browser connectivity without a central server. Build completely peer-to-peer web applications, no trackers or relay servers required. Connecting projects safely, privately, and reliably in WebPEER Network.
5
5
 
6
- [Basic Connection Demo](https://nuzulul.github.io/webpeerjs/demo/)
6
+ [Basic Connection Demo - https://nuzulul.github.io/webpeerjs/demo/](https://nuzulul.github.io/webpeerjs/demo/)
7
7
 
8
8
  ## Security
9
9
 
10
- WebPEER.js uses [`libp2p gossipsub`](https://docs.libp2p.io/concepts/security/security-considerations/#publish--subscribe) to enables communication between peers.
10
+ WebPEER Network run over [`libp2p gossipsub`](https://docs.libp2p.io/concepts/security/security-considerations/#publish--subscribe) protocol to enables communication between peers.
11
11
  > By default, the gossipsub implementation will sign all messages with the author’s private key, and require a valid signature before accepting or propagating a message further. This prevents messages from being altered in flight, and allows recipients to authenticate the sender.
12
12
 
13
13
  > However, as a cooperative protocol, it may be possible for peers to interfere with the message routing algorithm in a way that disrupts the flow of messages through the network.
@@ -21,9 +21,9 @@ WebPEER.js uses [`libp2p gossipsub`](https://docs.libp2p.io/concepts/security/se
21
21
  * ✅ Censorship Resistant
22
22
 
23
23
  ## Browser Support
24
- ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Brave](https://raw.github.com/alrra/browser-logos/master/src/brave/brave_48x48.png) |
24
+ ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Brave](https://raw.github.com/alrra/browser-logos/master/src/brave/brave_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) |
25
25
  --- | --- | --- | --- | --- | --- |
26
- Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest |
26
+ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest |
27
27
 
28
28
  ## Quickstart
29
29
 
@@ -46,7 +46,7 @@ Uses built-in JS files from [latest release](https://github.com/nuzulul/webpeerj
46
46
  <script src="https://cdn.jsdelivr.net/npm/webpeerjs@0.1/dist/umd/webpeerjs.min.js"></script>
47
47
  ```
48
48
 
49
- ## Usage
49
+ ## Example
50
50
 
51
51
  ```
52
52
  import { webpeerjs } from 'webpeerjs'
@@ -73,7 +73,9 @@ void async function main() {
73
73
 
74
74
  ## API
75
75
 
76
- - `createWebpeer()` - Create a new node.
76
+ - `createWebpeer(config)` - Create a new node.
77
+ - `config` - Configuration object contain:
78
+ - `rtcConfiguration` - **(optional)** Custom [rtcConfiguration](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection) for WebRTC transport, the only transport available for direct peer-to-peer connectivity between browser.
77
79
  - `id` - The unique ID of the node as an identity in the global network.
78
80
  - `status` - Get the node status, returns `connected` or `unconnected`.
79
81
  - `peers` - Get all connected peers.