Added auto-instantiators to classes
This commit is contained in:
parent
ff3679a3fe
commit
7919c8cfc5
4 changed files with 6 additions and 3 deletions
src
|
@ -15,6 +15,7 @@ var SecureRandom = require('./jsbn/rng');
|
|||
var rng = new SecureRandom();
|
||||
|
||||
var Wallet = function (seed) {
|
||||
if (!(this instanceof Wallet)) { return new Wallet(seed); }
|
||||
|
||||
// Stored in a closure to make accidental serialization less likely
|
||||
var keys = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue