implement removeLoginBlock rpc

This commit is contained in:
ansuz
2018-06-19 17:17:56 +02:00
parent 577dea4c75
commit cb5fa72dba
8 changed files with 56 additions and 4 deletions

View File

@@ -75,5 +75,16 @@ define([
};
};
Block.remove = function (keys) {
// sign the hash of the text 'DELETE_BLOCK'
var sig = Nacl.sign.detached(Nacl.hash(
Nacl.util.decodeUTF8('DELETE_BLOCK')), keys.sign.secretKey);
return {
publicKey: Nacl.util.encodeBase64(keys.sign.publicKey),
signature: Nacl.util.encodeBase64(sig),
};
};
return Block;
});