Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d35609f

Browse files
committedMar 12, 2014
change example to new style
1 parent 56c12a0 commit d35609f

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed
 

‎examples/Address.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33

44
var run = function() {
5-
// Replace '..' with 'bitcore' if you plan on using this code elsewhere.
6-
var Address = require('../Address');
5+
// Replace '../bitcore' with 'bitcore' if you use this code elsewhere.
6+
var bitcore = require('../bitcore');
7+
var Address = bitcore.Address;
78

89
var addrs = [
910
'1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa',

‎examples/PeerManager.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use strict';
22

33
var run = function() {
4-
// Replace '..' with 'bitcore' if you plan on using this code elsewhere.
5-
var networks = require('../networks');
6-
var Peer = require('../Peer');
4+
// Replace '../bitcore' with 'bitcore' if you use this code elsewhere.
5+
var bitcore = require('../bitcore');
6+
var networks = bitcore.networks;
7+
var Peer = bitcore.Peer;
78
var PeerManager = require('soop').load('../PeerManager', {
89
network: networks.testnet
910
});

‎examples/Rpc.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
'use strict';
22

33
var run = function() {
4-
// Replace '..' with 'bitcore' if you plan on using this code elsewhere.
5-
var RpcClient = require('../RpcClient');
4+
// Replace '../bitcore' with 'bitcore' if you use this code elsewhere.
5+
var bitcore = require('../bitcore');
6+
var RpcClient = bitcore.RpcClient;
67
var hash = '0000000000b6288775bbd326bedf324ca8717a15191da58391535408205aada4';
78

89
var config = {

‎examples/SendTx.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
'use strict';
22

33
var run = function() {
4-
// Replace '..' with 'bitcore' if you plan on using this code elsewhere.
5-
var networks = require('../networks');
6-
var Peer = require('../Peer');
7-
var Transaction = require('../Transaction');
8-
var Address = require('../Address');
9-
var Script = require('../Script');
10-
var coinUtil = require('../util/util');
4+
// Replace '../bitcore' with 'bitcore' if you use this code elsewhere.
5+
var bitcore = require('../bitcore');
6+
var networks = bitcore.networks;
7+
var Peer = bitcore.Peer;
8+
var Transaction = bitcore.Transaction;
9+
var Address = bitcore.Address;
10+
var Script = bitcore.Script;
11+
var coinUtil = bitcore.util;
1112
var PeerManager = require('soop').load('../PeerManager', {
1213
network: networks.testnet
1314
});

0 commit comments

Comments
 (0)
Please sign in to comment.