|
|
|
@ -7,6 +7,7 @@ var ethJSABI = require('ethereumjs-abi'); |
|
|
|
|
var EthJSBlock = require('ethereumjs-block'); |
|
|
|
|
var BN = ethJSUtil.BN; |
|
|
|
|
var EventManager = require('./lib/eventManager'); |
|
|
|
|
var crypto = require('crypto'); |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
trigger debugRequested |
|
|
|
@ -49,6 +50,14 @@ UniversalDApp.prototype.reset = function (contracts, getAddress, getValue, getGa |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
UniversalDApp.prototype.newAccount = function () { |
|
|
|
|
var privateKey; |
|
|
|
|
do { |
|
|
|
|
privateKey = crypto.randomBytes(32); |
|
|
|
|
} while (!ethJSUtil.isValidPrivate(privateKey)); |
|
|
|
|
this._addAccount(privateKey); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
UniversalDApp.prototype.addAccount = function (privateKey, balance) { |
|
|
|
|
var self = this; |
|
|
|
|
|
|
|
|
|