Skip to content
Snippets Groups Projects
Commit 578fcaea authored by Éloïs's avatar Éloïs
Browse files

Update 0004_ws2p_v1.md

parent cf452425
No related branches found
No related tags found
1 merge request!4RFC 4 : Duniter WS2P API v1
......@@ -13,14 +13,9 @@ This document details the current specifications of ws2p v1 as they are already
* [Establishing a WS2P connection](#establishing-a-ws2p-connection)
* [HEAD messages](#head-messages)
* [Documents messages](#documents-messages)
* [Block](#block)
* [Identity](#identity)
* [Certification](#certification)
* [Membership](#membership)
* [Transaction](#transaction)
* [Peer](#peer)
* [Peer format](#peer-format)
* [Rebound policy](#rebound-policy)
* [HEAD Rebound policy](#head-rebound policy)
* [HEAD Rebound policy](#head-rebound-policy)
* [Documents rebound policy](#documents-rebound-policy)
## What is WS2P ?
......@@ -239,7 +234,7 @@ All documents are sent in json format, the body format of the request is always
{
body: {
name: DOCUMENT_TYPE_ID,
[DOCUMENT_TYPE_NAME]: DOCUMENT_DATAS
[DOCUMENT_TYPE_NAME]: DOCUMENT_IN_JSON_FORMAT
}
}
......@@ -253,17 +248,41 @@ table of document types :
| 4| identity|
| 5| block|
### Block
With the exception of the peer format detailed below, the json format of each document is already detailed in the DUP protocol v10 : https://git.duniter.org/nodes/typescript/duniter/blob/1.6/doc/Protocol.md
### Identity
### Peer format
### Certification
### Membership
{
"version": 10,
"currency": CURRENCY_NAME,
"endpoints": [
ENDPOINT1,
ENDPOINT2,
ENDPOINT3
],
"status": "UP",
"block": BLOCKSTAMP,
"signature": SIGNATURE,
"raw": RAW_FORMAT,
"pubkey": PUBKEY
}
### Transaction
Real example :
### Peer
{
"version": 10,
"currency": "g1",
"endpoints": [
"BMAS g1.monnaielibreoccitanie.org 443",
"BASIC_MERKLED_API g1.monnaielibreoccitanie.org 443",
"WS2P b48824f0 g1.monnaielibreoccitanie.org 20901"
],
"status": "UP",
"block": "89908-000006F1C135E1D1CD41BF13DC3A406F2DF577144BEEAB49F437D661FF3E8018",
"signature": "zTPLWdmHm5c3uIfTKxYGtSd59b13Lc+FCcbCBuHEEllYj+3xwquo/wo3VbF5J1gzMewamB9JYOV74uNOm8itAQ==",
"raw": "Version: 10\nType: Peer\nCurrency: g1\nPublicKey: 7v2J4badvfWQ6qwRdCwhhJfAsmKwoxRUNpJHiJHj7zef\nBlock: 89908-000006F1C135E1D1CD41BF13DC3A406F2DF577144BEEAB49F437D661FF3E8018\nEndpoints:\nBMAS g1.monnaielibreoccitanie.org 443\nBASIC_MERKLED_API g1.monnaielibreoccitanie.org 443\nWS2P b48824f0 g1.monnaielibreoccitanie.org 20901\nzTPLWdmHm5c3uIfTKxYGtSd59b13Lc+FCcbCBuHEEllYj+3xwquo/wo3VbF5J1gzMewamB9JYOV74uNOm8itAQ==\n",
"pubkey": "7v2J4badvfWQ6qwRdCwhhJfAsmKwoxRUNpJHiJHj7zef"
}
## Rebound policy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment