You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.
Add a new /preregistration/claimccd/:account?signature=<signature> (PUT) endpoint to claim 100 CCD and have it transferred from a main account to the account in the query.
Validations should be returning using 4xx error and a json document:
{
"error": "<specific error>"
}
Validations:
Account in invalid format (regex): 406
Account not found in the preregistration collection AND in the account collection (it needs to be in both): 404
Signature not sent: 406
Signature not base64: 406
Unencoded signature not json format: 406
Validation fails (using concordium-sdk): 403
Preregistration document has a 100ccd field with value true: 406
1000 or more preregistration documents have a 100ccd field with value true: 406
Important:
After signature verification (using concordium-sdk) the nonce needs to be cleared in the account document to invalidate it (if validation passes or fails).
Procedure:
If all validations pass, two things need to happen:
Once the transfer has been confirmed (wait and confirm until the transaction block has completely succeeded), update the preregistration document belonging to the account and add a 100ccd field with value true.
If any of those 2 steps fail, send a 500 http code.
If everything succeeds, return a 201 http code:
{
"result": "true"
}
The text was updated successfully, but these errors were encountered:
Add a new
/preregistration/claimccd/:account?signature=<signature>
(PUT) endpoint to claim 100 CCD and have it transferred from a main account to theaccount
in the query.Validations should be returning using 4xx error and a json document:
Validations:
preregistration
collection AND in theaccount
collection (it needs to be in both): 404100ccd
field with valuetrue
: 406100ccd
field with valuetrue
: 406Important:
After signature verification (using concordium-sdk) the nonce needs to be cleared in the
account
document to invalidate it (if validation passes or fails).Procedure:
If all validations pass, two things need to happen:
.env
file with its private key) to theaccount
sent and validated in the API query: https://github.com/Concordium/concordium-node-sdk-js/tree/main/packages/common#create-a-simple-transferpreregistration
document belonging to theaccount
and add a100ccd
field with valuetrue
.If any of those 2 steps fail, send a 500 http code.
If everything succeeds, return a 201 http code:
The text was updated successfully, but these errors were encountered: