WalletKey: internalize external JSON database object

This commit is contained in:
Jeff Garzik 2013-10-31 09:40:50 -04:00
parent fda3950573
commit 2430bde72e

View File

@ -31,6 +31,12 @@ function ClassSpec(b) {
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;
};
module.defineClass(ClassSpec);