miner mines continuously,
moved to an account model, transactions working, querying working, more checking of valid data
This commit is contained in:
parent
59bb42be11
commit
9847b2056b
12 changed files with 663 additions and 365 deletions
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue