diff --git a/Key.js b/Key.js index 550c40f..0f30616 100644 --- a/Key.js +++ b/Key.js @@ -50,6 +50,8 @@ if (process.versions) { }; kSpec.prototype.regenerateSync = function() { + +console.log('[Key.js.53]', this); //TODO if (!this.private) { throw new Error('Key does not have a private key set'); } diff --git a/WalletKey.js b/WalletKey.js index c2311a5..716dc8e 100644 --- a/WalletKey.js +++ b/WalletKey.js @@ -21,7 +21,9 @@ WalletKey.prototype.generate = function() { WalletKey.prototype.storeObj = function() { var pubKey = this.privKey.public.toString('hex'); +console.log('[WalletKey.js.23:pubKey:]',pubKey); //TODO var pubKeyHash = coinUtil.sha256ripe160(this.privKey.public); +console.log('[WalletKey.js.25:pubKeyHash:]',pubKeyHash); //TODO var addr = new Address(this.network.addressPubkey, pubKeyHash); var priv = new PrivateKey(this.network.keySecret, this.privKey.private, this.privKey.compressed); var obj = { diff --git a/bitcore.js b/bitcore.js index c66b5c5..0b12d83 100644 --- a/bitcore.js +++ b/bitcore.js @@ -37,14 +37,11 @@ requireWhenAccessed('PrivateKey', './PrivateKey'); requireWhenAccessed('RpcClient', './RpcClient'); requireWhenAccessed('Wallet', './Wallet'); requireWhenAccessed('WalletKey', './WalletKey'); +requireWhenAccessed('PeerManager', './PeerManager'); module.exports.Buffer = Buffer; if (typeof process.versions === 'undefined') { // Browser specific module.exports.bignum.config({EXPONENTIAL_AT: 9999999, DECIMAL_PLACES: 0, ROUNDING_MODE: 1}); } -else { - // Nodejs specific - requireWhenAccessed('PeerManager', './PeerManager'); -} diff --git a/examples/example.html b/examples/example.html index 951ef1e..b9d3eaf 100644 --- a/examples/example.html +++ b/examples/example.html @@ -40,32 +40,34 @@ }); print('