generated from Consensys/doc.goquorum
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added API concept and how to configure content (#37)
* WIP Signed-off-by: Madeline <[email protected]> * API overview and config Signed-off-by: Madeline <[email protected]> * removing file Signed-off-by: Madeline <[email protected]> * rework Signed-off-by: Madeline <[email protected]> * lint Signed-off-by: Madeline <[email protected]> * lint Signed-off-by: Madeline <[email protected]>
- Loading branch information
1 parent
0059438
commit b2cfe27
Showing
6 changed files
with
192 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
description: Tessera API | ||
--- | ||
|
||
# Tessera API | ||
|
||
The Tessera API consists of three parts: | ||
|
||
* [GoQuorum to Tessera](#goquorum-to-tessera-api) | ||
* [Peer to peer](#peer-to-peer-api) | ||
* [Third party](#third-party-api). | ||
|
||
## GoQuorum to Tessera API | ||
|
||
GoQuorum uses the GoQuorum to Tessera API to: | ||
|
||
* Check if the associated Tessera node is running. | ||
* Send and receive private transactions. | ||
|
||
## Peer to peer API | ||
|
||
Tessera uses the Peer to peer API to: | ||
|
||
* Perform discovery. | ||
* Send and receive encrypted payloads. | ||
|
||
## Third party API | ||
|
||
Tessera uses the third party API to store encrypted payloads for external applications. For example, | ||
[Quorum.js](https://github.com/consenSys/quorum.js). | ||
|
||
[Configure the Tessera API servers in `serverConfigs` in the Tessera configuration file.](../HowTo/Configure/TesseraAPI.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
description: Configure servers for Tessera API | ||
--- | ||
|
||
# Configure servers for Tessera API | ||
|
||
Configure the [servers for the Tessera API](../../Concepts/TesseraAPI.md) in the | ||
[Tessera configuration file](Tessera.md). | ||
|
||
Specify the servers to be started as a list in `serverConfigs`. | ||
|
||
```json | ||
"serverConfigs": [ | ||
<server settings> | ||
] | ||
``` | ||
|
||
## Server Addresses | ||
|
||
The server configuration has two address entries: | ||
|
||
- `serverAddress` - Always specified. | ||
- `bindingAddress` - Optional endpoint to use for the binding. Specify | ||
to bind to an internal IP while advertising an external IP using `serverAddress`. | ||
|
||
Each server is individually configured and can advertise over HTTP, HTTPS, or a Unix Socket. | ||
|
||
### HTTP server configuration | ||
|
||
=== "HTTP" | ||
|
||
```json | ||
{ | ||
"app": "<app type>", | ||
"enabled": <boolean>, | ||
"serverAddress":"http://[host]:[port]/[path]", | ||
"communicationType" : "REST" | ||
} | ||
``` | ||
|
||
=== "Third Party Example" | ||
|
||
```json | ||
{ | ||
"app": "ThirdParty", | ||
"enabled": true, | ||
"serverAddress": "http://localhost:9081", | ||
"communicationType": "REST" | ||
} | ||
``` | ||
|
||
### HTTPS server configuration | ||
|
||
=== "HTTPS" | ||
|
||
```json | ||
{ | ||
"app": "<app type>", | ||
"enabled": <boolean>, | ||
"serverAddress":"https://[host]:[port]/[path]", | ||
"communicationType" : "REST", | ||
"sslConfig": { | ||
<SSL settings> | ||
} | ||
} | ||
``` | ||
|
||
=== "P2P Example" | ||
|
||
```json | ||
{ | ||
"app": "P2P", | ||
"enabled": true, | ||
"serverAddress": "http://localhost:9001", | ||
"sslConfig": { | ||
"tls": "enum STRICT,OFF", | ||
"generateKeyStoreIfNotExisted": "boolean", | ||
"serverKeyStore": "Path", | ||
"serverTlsKeyPath": "Path", | ||
"serverTlsCertificatePath": "Path", | ||
"serverKeyStorePassword": "String", | ||
"serverTrustStore": "Path", | ||
"serverTrustCertificates": [ | ||
"Path" | ||
], | ||
"serverTrustStorePassword": "String", | ||
"serverTrustMode": "TOFU", | ||
"clientKeyStore": "Path", | ||
"clientTlsKeyPath": "Path", | ||
"clientTlsCertificatePath": "Path", | ||
"clientKeyStorePassword": "String", | ||
"clientTrustStore": "Path", | ||
"clientTrustCertificates": [ | ||
"Path" | ||
], | ||
"clientTrustStorePassword": "String", | ||
"clientTrustMode": "TOFU", | ||
"knownClientsFile": "Path", | ||
"knownServersFile": "Path" | ||
}, | ||
"communicationType": "REST", | ||
"properties": { | ||
"partyInfoInterval": "Long", | ||
"enclaveKeySyncInterval": "Long", | ||
"syncInterval": "Long", | ||
"resendWaitTime": "Long" | ||
} | ||
} | ||
``` | ||
|
||
### Unix socket server configuration | ||
|
||
=== "Unix socket" | ||
|
||
```json | ||
{ | ||
"app": "<app type", | ||
"enabled": <boolean, | ||
"serverAddress":"unix://[path]", | ||
"communicationType" : "REST" | ||
} | ||
``` | ||
|
||
=== "Q2T Example" | ||
|
||
```json | ||
{ | ||
"app": "Q2T", | ||
"enabled": true, | ||
"serverAddress": "unix:/tmp/tm.ipc", | ||
"communicationType": "REST" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
--- | ||
description: REST API overview | ||
description: REST API reference | ||
--- | ||
|
||
# REST API | ||
|
||
The Tessera REST API consists of 3 parts. | ||
The Rest API consists of three parts: [Peer to Peer, GoQuorum to Tessera, and Third Party](../Concepts/TesseraAPI.md). | ||
|
||
## Peer-to-peer APIs | ||
[Configure the API servers in the Tessera configuration file](../HowTo/Configure/TesseraAPI.md). | ||
|
||
Tessera nodes communicate with each other using this API to: | ||
For the API methods, refer to the [API reference](https://consensys.github.io/doc.tessera/). | ||
|
||
- Perform discovery | ||
- Send and receive encrypted payloads | ||
## Defining API versions | ||
|
||
!!! Warning "Defining First API Version" | ||
Every client side request (that is, `/push` and [`/partyinfo`](https://consensys.github.io/tessera/#operation/broadcastPartyInfo)) | ||
includes a header parameter listing the supported API versions. The parameter is called `tesseraSupportedApiVersions`. | ||
|
||
From version 0.11.0, for every client side request i.e., `/push` and `/partyinfo`, Tessera will | ||
now include a parameter which is a list of API versions that it supports into the http header called `supportedApiVersions`. | ||
|
||
Release 0.11.0 defines the first API version and during the `partyinfo` exchange these values will be | ||
stored against the node in the `NetworkStore` so that a Tessera node at any time will be aware of | ||
the versions that its peers currently support. | ||
|
||
This can later be used to ensure that a remote peer is actively supporting a certain feature before forwarding a transaction. | ||
Refer [API Reference site](https://consensys.github.io/doc.tessera/) for more information. | ||
|
||
## Third party APIs | ||
|
||
Tessera nodes communicate with third parties using this API to: | ||
|
||
- Store encrypted payloads for external applications | ||
|
||
## GoQuorum to Tessera APIs (default) | ||
|
||
GoQuorum uses this API to: | ||
|
||
- Check if the local Tessera node is running | ||
- Send and receive details of private transactions | ||
|
||
This API is described in the OpenAPIv3 format available on | ||
[Tessera API reference site](https://consensys.github.io/doc.tessera/). | ||
Exchanging and storing the supported API versions enables Tessera nodes to know which API | ||
versions are supported by peers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters