Skip to content
Snippets Groups Projects
Commit 26c48bd4 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Merge remote-tracking branch 'origin/add_heads_in_http_api' into dev

parents 16d2cde0 79aef668
Branches
Tags
1 merge request!1281[enh] add network/ws2p/heads requests in HTTP_API.md
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
* [peering](#networkpeering) * [peering](#networkpeering)
* [peering/peers (GET)](#networkpeeringpeers-get) * [peering/peers (GET)](#networkpeeringpeers-get)
* [peering/peers (POST)](#networkpeeringpeers-post) * [peering/peers (POST)](#networkpeeringpeers-post)
* [ws2p/heads (GET)](#networkws2pheads-get)
* [tx/](#tx) * [tx/](#tx)
* [process](#txprocess) * [process](#txprocess)
* [sources/[pubkey]](#txsourcespubkey) * [sources/[pubkey]](#txsourcespubkey)
...@@ -70,12 +71,12 @@ Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchan ...@@ -70,12 +71,12 @@ Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchan
| |-- add | |-- add
| |-- certify | |-- certify
| |-- revoke | |-- revoke
| |-- lookup[uid|pubkey] | |-- lookup[UID|PUBKEY]
| |-- members | |-- members
| |-- requirements/[pubkey] | |-- requirements/[PUBKEY]
| |-- certifiers-of/[uid|pubkey] | |-- certifiers-of/[UID|PUBKEY]
| |-- certified-by/[uid|pubkey] | |-- certified-by/[UID|PUBKEY]
| `-- identity-of/[uid|pubkey] | `-- identity-of/[UID|PUBKEY]
|-- blockchain/ |-- blockchain/
| |-- parameters | |-- parameters
| |-- membership | |-- membership
...@@ -89,17 +90,17 @@ Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchan ...@@ -89,17 +90,17 @@ Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchan
| |-- excluded | |-- excluded
| |-- ud | |-- ud
| |-- tx | |-- tx
| |-- branches | |-- hardship/[PUBKEY]
| |-- hardship | |-- block/[NUMBER]
| | `-- [PUBKEY]
| |-- block
| | `-- [NUMBER]
| |-- difficulties | |-- difficulties
| `-- current | |-- current
| `-- branches
|-- network/ |-- network/
| |-- peers | |-- peers
| `-- peering | |-- peering/
| `-- peers | | `-- peers
| `-- ws2p/
| `-- heads
|-- tx/ |-- tx/
| |-- process | |-- process
| |-- sources | |-- sources
...@@ -1283,6 +1284,38 @@ The posted entry. ...@@ -1283,6 +1284,38 @@ The posted entry.
} }
``` ```
#### `network/ws2p/heads (GET)`
**Goal**
Get the ws2p heads known by the node in the currency network.
**Parameters**
*None*.
**Returns**
The list of the head documents (see WS2P Network Protocol RFC for a description of the head documents format).
```json
{
"heads": [
{
"message": "WS2POCAIC:HEAD:1:CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd:223482-0000002C6AC0FBE21401444C9BE8D027C86E35E8471B3D2BE1A3AF65CECBCE1E:c188e511:duniter:1.7.18:1",
"sig": "FYylLELBzS1jht0YODVDOvflupPcDTZZDAyYToHB9RE+KMN/XdjPo6JcaXsj6GD3rQ3oQVdICkpl8nfuNESwDQ==",
"messageV2": "WS2POCAIC:HEAD:2:CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd:223482-0000002C6AC0FBE21401444C9BE8D027C86E35E8471B3D2BE1A3AF65CECBCE1E:c188e511:duniter:1.7.18:1:0:0",
"sigV2": "fRAsFMHuSyjnC5GhJMMLYivThtrs7lP4iuwHXXOmkPzws6aqQMRuQQAipcqTBzDyDax7y9VCxM1hMD3jDJJHBQ==",
"step": 3
},
{
"message": "WS2POCA:HEAD:1:2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ:223548-0000057A98C3099CDCF08B4F4F01C6EEB7D6C735C3943D62E8030138974D2C28:403a5b32:duniter:1.7.18:1",
"sig": "PsaSv/ZjgjoNQCMTY9dXmV0IX/TyZEgvtUZSZSEvc1mlO9v9T9jKrfrVXH8N7XdhuMyEHu+Q3fVbQRHEdXvXDg==",
"messageV2": "WS2POCA:HEAD:2:2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ:223548-0000057A98C3099CDCF08B4F4F01C6EEB7D6C735C3943D62E8030138974D2C28:403a5b32:duniter:1.7.18:1:10:10",
"sigV2": "aw6wzt81S5DjHCYYlB8jinHDlM+GiMscV7/MRFXxcPJP+A62ILg3cW5DCfBlawPomDtoi6v9XL4TYAAIPZjkAA==",
"step": 2
}
}
```
### tx/* ### tx/*
#### `tx/process` #### `tx/process`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment