miner mines continuously,

moved to an account model,
transactions working,
querying working,
more checking of valid data
This commit is contained in:
Josip Milovac 2023-01-10 17:11:56 +11:00
parent 59bb42be11
commit 9847b2056b
12 changed files with 663 additions and 365 deletions

View file

@ -19,6 +19,14 @@ class ChainUtil {
static verifySignature(publicKey, signature, dataHash) {
return ec.keyFromPublic(publicKey, 'hex').verify(dataHash, signature);
}
static deserializeKeyPair(serialized) {
return ec.keyFromPrivate(serialized, 'hex');
}
static serializeKeyPair(keyPair) {
return keyPair.getPrivate().toString('hex');
}
}
module.exports = ChainUtil;