add authentication via new Message core class
This commit is contained in:
parent
a1fe7b3d7d
commit
543c42a6a8
9 changed files with 226 additions and 23 deletions
|
|
@ -32,9 +32,17 @@ PrivateKey.prototype.getIdPriv = function() {
|
|||
return this.idpriv;
|
||||
};
|
||||
|
||||
PrivateKey.prototype.getIdKey = function() {
|
||||
if (!this.idkey) {
|
||||
this.cacheId();
|
||||
}
|
||||
return this.idkey;
|
||||
};
|
||||
|
||||
PrivateKey.prototype.cacheId = function() {
|
||||
var path = Structure.IdFullBranch;
|
||||
var idhk = this.bip.derive(path);
|
||||
this.idkey = idhk.eckey;
|
||||
this.id = idhk.eckey.public.toString('hex');
|
||||
this.idpriv = idhk.eckey.private.toString('hex');
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue