diff --git a/rfc/0004_ws2p_v1.md b/rfc/0004_ws2p_v1.md index 265d10e595921e3bb55769dec502fb26592a7440..a217a3ef6baec7a1af43a8addf86161f52812fa3 100644 --- a/rfc/0004_ws2p_v1.md +++ b/rfc/0004_ws2p_v1.md @@ -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 } } @@ -251,19 +246,43 @@ table of document types : | 2| membership| | 3| certification| | 4| identity| - |5| block| + | 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