The sismo vault API is a simple API that allows to store some encrypted data on a persistent storage.
Endpoint: https://vault-api.sismo.io/add
Method: POST
Parameters:
token: A random secret of the user.ciphertext: Some encrypted text to store on the vault.
Response:
id: Thehash(token)that serve to retrieve a vault.ciphertext: The encrypted text to store on the vault provided in parameters.
Example:
$ curl -X POST -H 'content-type: application/json' https://vault-api.sismo.io/add -d @- <<EOF
{
"token": "pookie",
"ciphertext": "0x123...example of encrypted text",
"version": "1",
}
EOF
{
"id": "2586915241cb56033a4eabb0fec9664775e2ab26866fa9109732556ccf440b0a",
"ciphertext": "0x123...example of encrypted text",
"version": "1",
}Endpoint: https://vault-api.sismo.io/retrieve
Method: GET
Parameters:
id: Thehash(token)that serve as identifier to retrieve the ciphertext.
Response:
id: Thehash(token)that serve as identifier to retrieve the ciphertext.ciphertext: The retrieved encrypted text which was saved on the vault.
Example:
$ curl https://vault-api.sismo.io/retrieve?id=2586915241cb56033a4eabb0fec9664775e2ab26866fa9109732556ccf440b0a
{
"id": "2586915241cb56033a4eabb0fec9664775e2ab26866fa9109732556ccf440b0a",
"ciphertext": "0x123...example of encrypted text",
"version": "1",
}Deploy with serverless
Example: staging deployment
sls deploy --stage stagingThen deploy the CloudFront with terraform in the ./terraform folder
terraform workspace select staging
terraform applyprod: vault-api.sismo.io
staging: vault-api.zikies.io
Install dependencies.
yarnRun the docker-compose
docker-compose upRun the test suite
yarn test