Skip to content

Commit

Permalink
doc: update gateway specification by adding the signature alongside t…
Browse files Browse the repository at this point in the history
…he url
  • Loading branch information
leventdem committed Sep 6, 2024
1 parent 80d44d3 commit 66233b0
Showing 1 changed file with 41 additions and 6 deletions.
47 changes: 41 additions & 6 deletions docs/references/gateway_api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Gateway API Specifications

## Endpoints
Expand All @@ -8,7 +7,15 @@

#### 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.
This endpoint returns a JSON object containing URLs from an S3 bucket, allowing the client to download important files such as the blockchain public key, CRS files for generating input proofs, and the bootstrap key.

For each item, multiple URLs are provided to improve availability, but all URLs point to the same file. This ensures redundancy and reliable access.

Each URL is accompanied by a cryptographic signature, enabling users to verify the integrity and authenticity of the downloaded files.

No query parameters are needed, as the gateway is already configured for a specific blockchain.



#### Query Parameters

Expand All @@ -27,12 +34,40 @@ The request is successful, and the response will include a JSON object with the
```json
{
"keyId": "12345",
"publicKey": ["https://s3.amazonaws.com/bucket-name/pks"],
"publicKey": [
{
"url": "https://s3.amazonaws.com/bucket-name/pks1",
"signature": "a5d2c5e8f7b60f..."
},
{
"url": "https://s3.amazonaws.com/bucket-name1/pks1",
"signature": "a5d2c5e8f7b60f..."
}
],
"crs": {
"2048": ["https://s3.amazonaws.com/bucket-name/crs"]
"2048": [
{
"url": "https://s3.amazonaws.com/bucket-name/crs1",
"signature": "c3f5d6e1e2f8b3..."
},
{
"url": "https://s3.amazonaws.com/bucket-name1/crs1",
"signature": "c3f5d6e1e2f8b3..."
}
]
},
"bootstrapKey": ["https://s3.amazonaws.com/bucket-name/sks"]
"bootstrapKey": [
{
"url": "https://s3.amazonaws.com/bucket-name/sks1",
"signature": "b4a1d8f9c7e1a2..."
},
{
"url": "https://s3.amazonaws.com/bucket-name1/sks1",
"signature": "b4a1d8f9c7e1a2..."
}
]
}

```

**Error Responses**
Expand All @@ -55,7 +90,7 @@ The request is successful, and the response will include a JSON object with the
```json
{
"error": "NotFound",
"message": "The specified key_id does not exist."
"message": "The requested resource was not found."
}
```

Expand Down

0 comments on commit 66233b0

Please sign in to comment.