4.0.0 • Published 2 years ago
@libp2p/webrtc-star-protocol v4.0.0
@libp2p/webrtc-star-protocol
shared types used by the libp2p webrtc transport and signalling server
Table of contents
Install
$ npm i @libp2p/webrtc-star-protocolDescription
This module contains type definitions for the websocket events that are exchanged between peers during the handshake process.
Protocol
- Peers connect to the same signal server and send an
ss-joinevent with their multiaddr as a string - Peers send one or more
ss-handshakeevents with candidate signals - Peers receive one or more
ws-handshakeevents with candidate signals - Peers send one
ss-handshakeevent with an offer signal - Peers receive one
ws-handshakeevents with an offer signal - Peers are now connected
- Peers receive one or more
ws-peerevents with a multiaddr as a string for peer discovery - Peers send an
ss-leaveevent or disconnect when hanging up
See ./src/index.ts for definitions of ss-handshake and ws-handshake payloads.
License
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
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.