Mise à jour effectuée, merci de nous signaler tout dysfonctionnement ! | Upgrade done, please let us know about any dysfunction!

Commit 6c089454 authored by nanocryk's avatar nanocryk

typo and formatting to line 59

parent 3a008cf8
# Duniter WS2P API v1
This document details the current specifications of ws2p v1 as they are already integrated in duniter-ts 1.6.
This document details the current specifications of WS2P v1 as they are already integrated in duniter-ts 1.6.
## Contents
......@@ -22,9 +22,11 @@ This document details the current specifications of ws2p v1 as they are already
WS2P means "**W**eb **S**ocket **To** **P**eer".
WS2P is the inter-node network layer, it is the only guarantor of synchronization between the different nodes of the network, so its role is critical.
WS2P is the network part of the duniter protocol, so any duniter implementation must integrate the WS2P network layer in order to work.
WS2P WS2P is exclusively based on websocket.
WS2P is the inter-node network layer, it is the only guarantor of synchronization between the different nodes of the network, so its role is critical.
WS2P is the network part of the Duniter protocol, so any Duniter implementation must integrate the WS2P network layer in order to work.
WS2P is exclusively based on websocket technology.
## WS2P Endpoints
......@@ -35,7 +37,7 @@ Resolved in* : `ws://host:port/path`
*If the port is `443`, the `wss://` protocol will be used.
uuid := Random sequence of 8 hexadecimal characters. (This uuid makes it possible to identify a Duniter node in a unique way.)
host := domain name or ipv4 or ipv6 (it is not possible to declare both an ipv4 and an ipv6, for this it is necessary to use a domain name.)
host := Domain name or ipv4 or ipv6 (it is not possible to declare both an ipv4 and an ipv6, for this it is necessary to use a domain name.)
port := Mandatory. Must be an integer. (_By convention, port 20900 is used for currency g1-test and port 20901 for currency g1._)
path := Optional access path
......@@ -45,16 +47,16 @@ This endpoint is resolved as follows: `wss://g1-monit.librelois.fr:443/ws2p`
Other valid endpoint : `WS2P a0a45ed2 88.174.120.187 20901`
This endpoint is resolved as follows: `ws://88.174.120.187:20901`
Any ws2p endpoint must match this regexp : `/^WS2P (?:[1-9][0-9]* )?([a-f0-9]{8}) ([a-z_][a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+) ([0-9]+)(?: (.+))?$/`
Any WS2P endpoint must match this regexp : `/^WS2P (?:[1-9][0-9]* )?([a-f0-9]{8}) ([a-z_][a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+) ([0-9]+)(?: (.+))?$/`
### Getting endpoints from other Duniter nodes
Initially, duniter is totally agnostic, it doesn't know any node.
Initially, Duniter is totally endpoint agnostic and don't know any node.
The first endpoints of other nodes are obtained during the synchronization step.
Currently, the synchronization process is fully managed by the BMA module,
but this synchronization process adds peers cards of the network nodes known by the node on which the user has chosen to synchronize to Duniter-ts's database.
but this synchronization process adds peer cards of the network nodes known by the node on which the user has chosen to synchronize to Duniter-ts's database.
When Duniter-ts starts up, the WS2P module accesses the peer cards stored in Duniter-ts's database following synchronization.
When duniter-ts starts up, the WS2P module accesses the peer cards stored in duniter-ts's database following synchronization.
## Priority of WS2P connections
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment