| title | api-judge v1.0.0 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| language_tabs |
|
||||||||||||||||||||||||
| toc_footers | |||||||||||||||||||||||||
| includes | |||||||||||||||||||||||||
| search | true | ||||||||||||||||||||||||
| highlight_theme | darkula | ||||||||||||||||||||||||
| headingLevel | 2 |
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Endpoints for encrypting and decrypting secrets. For use with the Manchester Codes Api Whisperer game
Base URLs:
License: MIT
Endpoints for encrypting secrets
POST /get-keys
returns keys which contain encrypted secret
Body parameter
{
"secret": "string",
"shares": "string",
"threshold": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | false | encrypt a secret and specify the number of keys and threshold for decryption |
| » secret | body | string | true | none |
| » shares | body | string | true | none |
| » threshold | body | string | true | none |
Example responses
200 Response
{
"keys": [
"string"
]
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | secret successfully encrypted | Inline |
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » keys | [string] | true | none | none |
Endpoints for decrypting secrets
POST /claim-victory
Body parameter
{
"keys": [
"string"
],
"successURL": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | false | post keys for decryption and an api endpoint to POST the secret to |
Example responses
200 Response
{
"message": "string"
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | keys successfully decrypted | Inline |
| 400 | Bad Request | bad request | Inline |
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | instructions |
Status Code 400
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | instructions |