Governance: Signing of Profiles implemented

This commit is contained in:
Luis Fernando Molina committed 2021-06-15 17:32:37 +02:00
1 parent f0acdf1303
commit 12faa5b099
18 files changed
+256 -42

No files matched your search

+19
View File
@@ -132,6 +132,25 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
respondWithContent(JSON.stringify(serverResponse), httpResponse)
return
}
case 'signData': {
let serverResponse = await WEB3_SERVER.signData(
params.privateKey,
params.data
)
respondWithContent(JSON.stringify(serverResponse), httpResponse)
return
}
case 'recoverAddress': {
let serverResponse = await WEB3_SERVER.recoverAddress(
params.signature
)
respondWithContent(JSON.stringify(serverResponse), httpResponse)
return
}
default: {
respondWithContent(JSON.stringify({ error: 'Method ' + params.method + ' is invalid.' }), httpResponse)
}