Skip to content
Snippets Groups Projects
Commit ab854cea authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Update documentation

parent 37889fbb
No related branches found
No related tags found
1 merge request!1422Optimize response time of `/wot/requirements/:search`
...@@ -19,7 +19,7 @@ export interface IIndexDAO extends ReduceableDAO<IindexEntry> { ...@@ -19,7 +19,7 @@ export interface IIndexDAO extends ReduceableDAO<IindexEntry> {
searchThoseMatching(search: string): Promise<OldIindexEntry[]>; searchThoseMatching(search: string): Promise<OldIindexEntry[]>;
getOldFromPubkey(search: string): Promise<OldIindexEntry | null>; getOldFromPubkey(pub: string): Promise<OldIindexEntry | null>;
getFullFromUID(uid: string): Promise<FullIindexEntry>; getFullFromUID(uid: string): Promise<FullIindexEntry>;
......
...@@ -162,10 +162,10 @@ For that purpose, Merkle URL defines different parameters and results: ...@@ -162,10 +162,10 @@ For that purpose, Merkle URL defines different parameters and results:
**Parameters** **Parameters**
Parameter | Description | Parameter | Description | Method |
--------- | ----------- |-----------|----------------------------------------------------------------------------------|-------------|
`leaves` | Defines wether or not leaves hashes should be returned too. Defaults to `false`. | `leaves` | Defines wether or not leaves hashes should be returned too. Defaults to `false`. | Query param |
`leaf` | Hash of a leaf whose content should be returned. Ignore `leaves` parameter. | `leaf` | Hash of a leaf whose content should be returned. Ignore `leaves` parameter. | Query param |
**Returns** **Returns**
...@@ -216,9 +216,9 @@ Each tree manages different data, and has a different goal. Hence, each tree has ...@@ -216,9 +216,9 @@ Each tree manages different data, and has a different goal. Hence, each tree has
Here is a summup of such rules: Here is a summup of such rules:
Merkle URL | Leaf | Sort | Merkle URL | Leaf | Sort |
---------------------- | --------------------------| ------------- |------------------------| --------------------------|---------------------------------|
`network/peers (GET)` | Hash of the peers' pubkey | By hash string sort, ascending. | `network/peers (GET)` | Hash of the peers' pubkey | By hash string sort, ascending. |
#### Unicity #### Unicity
...@@ -290,9 +290,9 @@ POST [Identity](./Protocol.md#identity) data. ...@@ -290,9 +290,9 @@ POST [Identity](./Protocol.md#identity) data.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |------------|-------------------|---------|
`identity` | The raw identity. | POST | `identity` | The raw identity. | POST |
**Returns** **Returns**
...@@ -330,9 +330,9 @@ POST [Certification](./Protocol.md#certification) data. ...@@ -330,9 +330,9 @@ POST [Certification](./Protocol.md#certification) data.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |--------|------------------------|---------|
`cert` | The raw certification. | POST | `cert` | The raw certification. | POST |
**Returns** **Returns**
...@@ -362,9 +362,9 @@ Remove an identity from Identity pool. ...@@ -362,9 +362,9 @@ Remove an identity from Identity pool.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |--------------|---------------------|--------|
`revocation` | The raw revocation. | POST | `revocation` | The raw revocation. | POST |
**Returns** **Returns**
...@@ -384,9 +384,9 @@ GET [Public key](./Protocol.md#publickey) data. ...@@ -384,9 +384,9 @@ GET [Public key](./Protocol.md#publickey) data.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|-------------------------------------------------|---------|
`search` | A string of data to look for (public key, uid). | URL | `search` | A string of data to look for (public key, uid). | URL |
**Returns** **Returns**
...@@ -488,7 +488,7 @@ A list of public key + uid. ...@@ -488,7 +488,7 @@ A list of public key + uid.
} }
``` ```
#### `wot/requirements/[pubkey]` #### `wot/requirements/[search]`
**Goal** **Goal**
...@@ -497,9 +497,10 @@ GET requirements to be filled by pubkey to become a member. ...@@ -497,9 +497,10 @@ GET requirements to be filled by pubkey to become a member.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|-----------------------------------------------------------------------------------------------------------------|--------------|
`pbkey` | Public key to check. | URL | `search` | Public key or uidto check. | URL |
| `pubkey` | Defines wether or not `search` is a pubkey. It not, will search on both `uid` or `pubkey`. Defaults to `false`. | Query params |
**Returns** **Returns**
...@@ -543,9 +544,9 @@ GET requirements pending on the server for identities with a minimum of minsig c ...@@ -543,9 +544,9 @@ GET requirements pending on the server for identities with a minimum of minsig c
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|------------------------------------------------------------------------|--------|
`minsig` | Return only pending identities with a minimum of minsig certifications | URL | `minsig` | Return only pending identities with a minimum of minsig certifications | URL |
**Returns** **Returns**
...@@ -637,9 +638,9 @@ GET [Certification](./Protocol.md#certification) data over a member. ...@@ -637,9 +638,9 @@ GET [Certification](./Protocol.md#certification) data over a member.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|-------------------------------------------------------------------------------------------------|--------|
`search` | Public key or uid of a *member* (or someone who *was a member*) we want see the certifications. | URL | `search` | Public key or uid of a *member* (or someone who *was a member*) we want see the certifications. | URL |
**Returns** **Returns**
...@@ -685,9 +686,9 @@ GET identity data written for a member. ...@@ -685,9 +686,9 @@ GET identity data written for a member.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|--------------------------------------------------------------------|--------|
`search` | Public key or uid of a *member* we want see the attached identity. | URL | `search` | Public key or uid of a *member* we want see the attached identity. | URL |
**Returns** **Returns**
...@@ -752,9 +753,9 @@ POST a [Membership](./Protocol.md#membership) document. ...@@ -752,9 +753,9 @@ POST a [Membership](./Protocol.md#membership) document.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |--------------|-------------------------------------------|--------|
`membership` | The membership document (with signature). | POST | `membership` | The membership document (with signature). | POST |
**Returns** **Returns**
...@@ -816,10 +817,10 @@ POST a new block to add to the blockchain. ...@@ -816,10 +817,10 @@ POST a new block to add to the blockchain.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
------------------ | ------------------------------ | ------ |--------------------|---------------------------------|--------|
`block` | The raw block to be added | POST | `block` | The raw block to be added | POST |
`signature` | Signature of the raw block | POST | `signature` | Signature of the raw block | POST |
**Returns** **Returns**
...@@ -833,9 +834,9 @@ GET the promoted block whose number `NUMBER`. ...@@ -833,9 +834,9 @@ GET the promoted block whose number `NUMBER`.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
------------------ | ------------------------------------------------------------- | ------ |--------------------|----------------------------------------------------------------|---------|
`NUMBER` | The promoted block number (integer value) we want to see. | URL | `NUMBER` | The promoted block number (integer value) we want to see. | URL |
**Returns** **Returns**
...@@ -923,10 +924,10 @@ GET the `[COUNT]` promoted blocks from `[FROM]` number, inclusive. ...@@ -923,10 +924,10 @@ GET the `[COUNT]` promoted blocks from `[FROM]` number, inclusive.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
------------------ | ------------------------------------------------------------- | ------ |---------|--------------------------------------|---------|
`COUNT` | The number of blocks we want to see. | URL | `COUNT` | The number of blocks we want to see. | URL |
`FROM` | The starting block. | URL | `FROM` | The starting block. | URL |
**Returns** **Returns**
...@@ -952,9 +953,9 @@ GET hardship level for given member's pubkey for writing next block. ...@@ -952,9 +953,9 @@ GET hardship level for given member's pubkey for writing next block.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|------------------------------|--------|
`PUBKEY` | Member's pubkey. | URL | `PUBKEY` | Member's pubkey. | URL |
**Returns** **Returns**
...@@ -1281,7 +1282,12 @@ Merkle URL refering to peering entries of every node inside the currency network ...@@ -1281,7 +1282,12 @@ Merkle URL refering to peering entries of every node inside the currency network
**Parameters** **Parameters**
*None*. **Parameters**
| Parameter | Description | Method |
|-----------|----------------------------------------------------------------------------------|-------------|
| `leaves` | Defines wether or not leaves hashes should be returned too. Defaults to `false`. | Query param |
| `leaf` | Hash of a leaf whose content should be returned. Ignore `leaves` parameter. | Query param |
**Returns** **Returns**
...@@ -1320,9 +1326,9 @@ POST a peering entry document. ...@@ -1320,9 +1326,9 @@ POST a peering entry document.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
----------- | ----------------------------------- | ------ |-------------|-----------------------------|--------|
`peer` | The peering entry document. | POST | `peer` | The peering entry document. | POST |
**Returns** **Returns**
...@@ -1382,9 +1388,9 @@ POST a transaction. ...@@ -1382,9 +1388,9 @@ POST a transaction.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
----------------- | ------------------------------------------------------------- | ------ |---------------|----------------------|--------|
`transaction` | The raw transaction. | POST | `transaction` | The raw transaction. | POST |
**Returns** **Returns**
...@@ -1440,9 +1446,9 @@ GET a list of available sources. ...@@ -1440,9 +1446,9 @@ GET a list of available sources.
**Parameters** **Parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|------------------------------|--------|
`pubkey` | Owner of the coins' pubkey. | URL | `pubkey` | Owner of the coins' pubkey. | URL |
**Returns** **Returns**
...@@ -1483,9 +1489,9 @@ Get the wallet transaction history ...@@ -1483,9 +1489,9 @@ Get the wallet transaction history
**parameters** **parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|--------------------|----------|
`pubkey` | Wallet public key. | URL | `pubkey` | Wallet public key. | URL |
**Returns** **Returns**
...@@ -1616,9 +1622,9 @@ Get the wallet transaction pending history ...@@ -1616,9 +1622,9 @@ Get the wallet transaction pending history
**parameters** **parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|--------------------|--------|
`pubkey` | Wallet public key. | URL | `pubkey` | Wallet public key. | URL |
**Returns** **Returns**
...@@ -1709,11 +1715,11 @@ Get the wallet transaction history ...@@ -1709,11 +1715,11 @@ Get the wallet transaction history
**parameters** **parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|---------------------|---------|
`pubkey` | Wallet public key. | URL | `pubkey` | Wallet public key. | URL |
`from` | The starting block. | URL | `from` | The starting block. | URL |
`to` | the ending block. | URL | `to` | the ending block. | URL |
**Returns** **Returns**
...@@ -1839,11 +1845,11 @@ Get the wallet transaction history ...@@ -1839,11 +1845,11 @@ Get the wallet transaction history
**parameters** **parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|-------------------------------------------|---------|
`pubkey` | Wallet public key. | URL | `pubkey` | Wallet public key. | URL |
`from` | The starting timestamp limit. (optionnal) | URL | `from` | The starting timestamp limit. (optionnal) | URL |
`to` | The ending timestamp. (optionnal) | URL | `to` | The ending timestamp. (optionnal) | URL |
**Returns** **Returns**
...@@ -1970,9 +1976,9 @@ Get the wallet universal dividend history (only not consumed ones) ...@@ -1970,9 +1976,9 @@ Get the wallet universal dividend history (only not consumed ones)
**parameters** **parameters**
Name | Value | Method | Name | Value | Method |
---- | ----- | ------ |----------|---------------------|--------|
`pubkey` | Wallet public key. | URL | `pubkey` | Wallet public key. | URL |
**Returns** **Returns**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment