|
|
@ -16,9 +16,7 @@ function Copayer(opts) { |
|
|
|
this.name = opts.name; |
|
|
|
this.xPubKey = opts.xPubKey; |
|
|
|
this.xPubKeySignature = opts.xPubKeySignature; // So third parties can check independently
|
|
|
|
if (opts.xPubKey) { |
|
|
|
this.signingPubKey = this.getSigningPubKey(); |
|
|
|
} |
|
|
|
this.signingPubKey = opts.signingPubKey || this.getSigningPubKey(); |
|
|
|
}; |
|
|
|
|
|
|
|
Copayer.prototype.getSigningPubKey = function () { |
|
|
@ -29,15 +27,12 @@ Copayer.prototype.getSigningPubKey = function () { |
|
|
|
Copayer.fromObj = function (obj) { |
|
|
|
var x = new Copayer(); |
|
|
|
|
|
|
|
x.version = obj.version; |
|
|
|
x.createdOn = obj.createdOn; |
|
|
|
x.id = obj.id; |
|
|
|
x.name = obj.name; |
|
|
|
x.xPubKey = obj.xPubKey; |
|
|
|
x.xPubKeySignature = obj.xPubKeySignature; |
|
|
|
x.signingPubKey = obj.signingPubKey; |
|
|
|
|
|
|
|
return x; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|