-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add specification for public key retrieval
- Loading branch information
Showing
1 changed file
with
70 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,70 @@ | ||
# Gateway API specifications | ||
|
||
# Gateway API Specifications | ||
|
||
## Endpoints | ||
|
||
<details> | ||
<summary>GET /keys ---- Retrieve public key, CRS (for input proof) and bootstrap key files download URLs</summary> | ||
|
||
#### Description | ||
|
||
This endpoint returns a JSON object containing URLs from an S3 bucket. These URLs allow the client to download the blockchain public key, the CRS files needed to compute input proofs, and the bootstrap key. There is no need for parameters because the gateway is already linked to a specific blockchain. | ||
|
||
#### Query Parameters | ||
|
||
No parameters. | ||
|
||
#### Headers | ||
|
||
None. | ||
|
||
#### Response | ||
|
||
**Success (200 OK)** | ||
|
||
The request is successful, and the response will include a JSON object with the following structure: | ||
|
||
```json | ||
{ | ||
"keyId": "12345", | ||
"publicKey": ["https://s3.amazonaws.com/bucket-name/pks"], | ||
"crs": { | ||
"2048": ["https://s3.amazonaws.com/bucket-name/crs"] | ||
}, | ||
"bootstrapKey": ["https://s3.amazonaws.com/bucket-name/sks"] | ||
} | ||
``` | ||
|
||
**Error Responses** | ||
|
||
| Status Code | Error Code | Description | | ||
| ----------- | ------------ | ------------------------------------------------ | | ||
| 400 | `BadRequest` | The request is invalid or missing required parameters. | | ||
| 404 | `NotFound` | The requested resource was not found. | | ||
| 500 | `ServerError` | An internal server error occurred. | | ||
|
||
#### Example Error Responses | ||
|
||
```json | ||
{ | ||
"error": "BadRequest", | ||
"message": "The request is invalid or missing required parameters." | ||
} | ||
``` | ||
|
||
```json | ||
{ | ||
"error": "NotFound", | ||
"message": "The specified key_id does not exist." | ||
} | ||
``` | ||
|
||
```json | ||
{ | ||
"error": "ServerError", | ||
"message": "An internal server error occurred. Please try again later." | ||
} | ||
``` | ||
|
||
</details> | ||
|