diff --git a/examples/Address.js b/examples/Address.js index 923d436..7aa9778 100644 --- a/examples/Address.js +++ b/examples/Address.js @@ -2,8 +2,9 @@ var run = function() { - // Replace '..' with 'bitcore' if you plan on using this code elsewhere. - var Address = require('../Address'); + // Replace '../bitcore' with 'bitcore' if you use this code elsewhere. + var bitcore = require('../bitcore'); + var Address = bitcore.Address; var addrs = [ '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', diff --git a/examples/PeerManager.js b/examples/PeerManager.js index 3cb0401..0d0bdba 100644 --- a/examples/PeerManager.js +++ b/examples/PeerManager.js @@ -1,9 +1,10 @@ 'use strict'; var run = function() { - // Replace '..' with 'bitcore' if you plan on using this code elsewhere. - var networks = require('../networks'); - var Peer = require('../Peer'); + // Replace '../bitcore' with 'bitcore' if you use this code elsewhere. + var bitcore = require('../bitcore'); + var networks = bitcore.networks; + var Peer = bitcore.Peer; var PeerManager = require('soop').load('../PeerManager', { network: networks.testnet }); diff --git a/examples/Rpc.js b/examples/Rpc.js index ea180bf..e4bf522 100644 --- a/examples/Rpc.js +++ b/examples/Rpc.js @@ -1,8 +1,9 @@ 'use strict'; var run = function() { - // Replace '..' with 'bitcore' if you plan on using this code elsewhere. - var RpcClient = require('../RpcClient'); + // Replace '../bitcore' with 'bitcore' if you use this code elsewhere. + var bitcore = require('../bitcore'); + var RpcClient = bitcore.RpcClient; var hash = '0000000000b6288775bbd326bedf324ca8717a15191da58391535408205aada4'; var config = { diff --git a/examples/SendTx.js b/examples/SendTx.js index 90b70ef..3664660 100644 --- a/examples/SendTx.js +++ b/examples/SendTx.js @@ -1,13 +1,14 @@ 'use strict'; var run = function() { - // Replace '..' with 'bitcore' if you plan on using this code elsewhere. - var networks = require('../networks'); - var Peer = require('../Peer'); - var Transaction = require('../Transaction'); - var Address = require('../Address'); - var Script = require('../Script'); - var coinUtil = require('../util/util'); + // Replace '../bitcore' with 'bitcore' if you use this code elsewhere. + var bitcore = require('../bitcore'); + var networks = bitcore.networks; + var Peer = bitcore.Peer; + var Transaction = bitcore.Transaction; + var Address = bitcore.Address; + var Script = bitcore.Script; + var coinUtil = bitcore.util; var PeerManager = require('soop').load('../PeerManager', { network: networks.testnet });