diff --git a/WalletKey.js b/WalletKey.js index ec78153..1fb8c23 100644 --- a/WalletKey.js +++ b/WalletKey.js @@ -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);