Commit 02bf452d authored by Éloïs's avatar Éloïs

[ref] rework human-readable format for peers & heads

parent 43ef56ba
......@@ -393,15 +393,17 @@ Signed document declaring all the endpoints of a peer.
The document is represented by an array of bytes containing (peer_card_size + 2) bytes.
to sign the document it is necessary to calculate the hash sha256 of this bytes array then to sign the hash obtained with the issuer's private key.
### Peer card BMA JSON format
### Peer card JSON format
This human-readable format will be used by all APIs that wish to provide peer cards in a human-readable format. For example, Client APIs.
{
"version": Number(VERSION),
"currency": Number(CURRENCY_CODE),
"node_id": String(NODE_ID in base16),
"algorithm": Number(ALGORITHM),
"algorithm": String(name of pubkey/sig algorithm)
"pubkey": String(ISSUER_PUBLIC_KEY in base58),
"block": String(BLOCK_NUMBER ++ "-" ++ BLOCK_HASH in base16),
"blockstamp": String(BLOCK_NUMBER ++ "-" ++ BLOCK_HASH in base16),
"endpoinds": Array([
String(ENDPOINT_1 in endpoint utf8 format),
String(ENDPOINT_2 in endpoint utf8 format),
......@@ -416,9 +418,9 @@ Example :
"version": 11,
"currency": 1,
"node_id": "15af24db",
"algorithm": 1,
"algorithm": "Ed25519",
"pubkey": "D9D2zaJoWYWveii1JRYLVK3J4Z7ZH3QczoKrnQeiM6mx"
"block": "128310-000002A569DCEED62227CAC0ABDFE6B2647B21B3193A40398CD12BC2A95C24D9",
"blockstamp": "128310-000002A569DCEED62227CAC0ABDFE6B2647B21B3193A40398CD12BC2A95C24D9",
"endpoinds": [
"WS2P 2 1 TLS 3 DEF LOW ABF 443 g1.durs.info ws2p"
],
......@@ -771,13 +773,15 @@ step := Number of head rebounds (unsigned field).
#### HEAD v3 JSON format
This human-readable format will be used by all APIs that wish to provide HEADs v3 in a human-readable format. For example, Client APIs.
{
"api_outgoing_conf": Number,
"api_incoming_conf": Number,
"free_mirror_rooms": Number,
"low_priority_rooms": Number,
"node_id": Number,
"algorithm": Number(pubkey.algorithm)
"algorithm": String(name of pubkey/sig algorithm)
"pubkey": String(pubkey.pubkey_content in base58),
"blockstamp": String(BlockId-BlockHash in base16),
"software_name": String,
......
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