Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This documentation will guide you through:
- **Gnosis Address**: `0x694e5de9345d39C148DA90e6939A3fd2142267D9`

- **Address of the API**:
- **Chiado Address**: `0xb9C303443c9af84777e60D5C987AbF0c43844918`
- **Chiado Address**: `0xd150bbf86C686de1a25820A94c2C2397e0bC54ab`
- **Gnosis Address**: `0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc`

### Rate limits / Authorization
Expand Down Expand Up @@ -261,14 +261,14 @@ curl -X GET "https://<API_BASE_URL>/event/get_trigger_expiration_block?eon=1&ide

To encrypt commitments, obtain the encryption data associated with your identity. There are two endpoints:

- **Time-based**: `/time/get_data_for_encryption` — parameters `address` (required) and `identityPrefix` (optional). Use the address that will register the identity (your account if self-registering, or the API address: Gnosis `0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc`, Chiado `0xb9C303443c9af84777e60D5C987AbF0c43844918`).
- **Time-based**: `/time/get_data_for_encryption` — parameters `address` (required) and `identityPrefix` (optional). Use the address that will register the identity (your account if self-registering, or the API address: Gnosis `0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc`, Chiado `0xd150bbf86C686de1a25820A94c2C2397e0bC54ab`).
- **Event-based**: `/event/get_data_for_encryption` — parameters `triggerDefinition` (required) and `identityPrefix` (optional).

Refer to the Swagger documentation for specifics on these endpoints.

#### Example Request (Time-based)
```bash
curl -X GET "https://<API_BASE_URL>/time/get_data_for_encryption?address=0xb9C303443c9af84777e60D5C987AbF0c43844918&identityPrefix=0x79bc8f6b4fcb02c651d6a702b7ad965c7fca19e94a9646d21ae90c8b54c030a0"
curl -X GET "https://<API_BASE_URL>/time/get_data_for_encryption?address=0xd150bbf86C686de1a25820A94c2C2397e0bC54ab&identityPrefix=0x79bc8f6b4fcb02c651d6a702b7ad965c7fca19e94a9646d21ae90c8b54c030a0"
```

#### Example Request (Event-based)
Expand Down Expand Up @@ -467,4 +467,4 @@ For additional support or inquiries:

---

Thank you for using Shutter! Together, we are building a more secure and decentralized future.
Thank you for using Shutter! Together, we are building a more secure and decentralized future.
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ const docTemplate = `{
"parameters": [
{
"type": "string",
"description": "Ethereum address associated with the identity. If you are registering the identity yourself, pass the address of the account making the registration. If you want the API to register the identity on gnosis mainnet, pass the address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the address: 0xb9C303443c9af84777e60D5C987AbF0c43844918",
"description": "Ethereum address associated with the identity. If you are registering the identity yourself, pass the address of the account making the registration. If you want the API to register the identity on gnosis mainnet, pass the address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the address: 0xd150bbf86C686de1a25820A94c2C2397e0bC54ab",
"name": "address",
"in": "query",
"required": true
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
"parameters": [
{
"type": "string",
"description": "Ethereum address associated with the identity. If you are registering the identity yourself, pass the address of the account making the registration. If you want the API to register the identity on gnosis mainnet, pass the address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the address: 0xb9C303443c9af84777e60D5C987AbF0c43844918",
"description": "Ethereum address associated with the identity. If you are registering the identity yourself, pass the address of the account making the registration. If you want the API to register the identity on gnosis mainnet, pass the address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the address: 0xd150bbf86C686de1a25820A94c2C2397e0bC54ab",
"name": "address",
"in": "query",
"required": true
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ paths:
the identity yourself, pass the address of the account making the registration.
If you want the API to register the identity on gnosis mainnet, pass the
address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the
address: 0xb9C303443c9af84777e60D5C987AbF0c43844918'
address: 0xd150bbf86C686de1a25820A94c2C2397e0bC54ab'
in: query
name: address
required: true
Expand Down
4 changes: 2 additions & 2 deletions internal/service/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (svc *CryptoService) GetDecryptionKey(ctx *gin.Context) {
// @Description Retrieves all the necessary data required by clients for encrypting any message using time-based identity computation.
// @Tags Crypto
// @Produce json
// @Param address query string true "Ethereum address associated with the identity. If you are registering the identity yourself, pass the address of the account making the registration. If you want the API to register the identity on gnosis mainnet, pass the address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the address: 0xb9C303443c9af84777e60D5C987AbF0c43844918"
// @Param address query string true "Ethereum address associated with the identity. If you are registering the identity yourself, pass the address of the account making the registration. If you want the API to register the identity on gnosis mainnet, pass the address: 0x228DefCF37Da29475F0EE2B9E4dfAeDc3b0746bc. For chiado pass the address: 0xd150bbf86C686de1a25820A94c2C2397e0bC54ab"
// @Param identityPrefix query string false "Optional identity prefix. You can generate it on your end and pass it to this endpoint, or allow the API to randomly generate one for you."
// @Success 200 {object} usecase.GetDataForEncryptionResponse "Success."
// @Failure 400 {object} error.Http "Invalid Get data for encryption request."
Expand Down Expand Up @@ -490,4 +490,4 @@ func (svc *CryptoService) GetEventTriggerExpirationBlock(ctx *gin.Context) {
ctx.JSON(http.StatusOK, gin.H{
"message": data,
})
}
}