Merge pull request #36 from jgarzik/txtool-hacks
WalletKey: internalize external JSON database object
This commit is contained in:
commit
2a6a973442
|
@ -31,6 +31,12 @@ function ClassSpec(b) {
|
||||||
return obj;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WalletKey.prototype.fromObj = function(obj) {
|
||||||
|
this.created = obj.created;
|
||||||
|
this.privKey = new KeyModule.Key();
|
||||||
|
this.privKey.private = new Buffer(obj.priv, 'hex');
|
||||||
|
};
|
||||||
|
|
||||||
return WalletKey;
|
return WalletKey;
|
||||||
};
|
};
|
||||||
module.defineClass(ClassSpec);
|
module.defineClass(ClassSpec);
|
||||||
|
|
Loading…
Reference in New Issue