diff --git a/lib/transport/peer.js b/lib/transport/peer.js index aea73bd..1c10f1b 100644 --- a/lib/transport/peer.js +++ b/lib/transport/peer.js @@ -16,12 +16,14 @@ var MAX_RECEIVE_BUFFER = 10000000; * with it using the standar messages of the bitcoin p2p protocol. * * @example + * ```javascript * * var peer = new Peer('127.0.0.1').setProxy('127.0.0.1', 9050); * peer.on('tx', function(tx) { * console.log('New transaction: ', tx.id); * }); * peer.connect(); + * ``` * * @param {String} host - IP address of the remote host * @param {Number} [port] - Port number of the remote host diff --git a/lib/transport/pool.js b/lib/transport/pool.js index d99033a..ec2b64c 100644 --- a/lib/transport/pool.js +++ b/lib/transport/pool.js @@ -18,12 +18,14 @@ function now() { * ongoing peer connections. Peer events are relayed to the pool. * * @example + * ```javascript * * var pool = new Pool(Networks.livenet); * pool.on('peerinv', function(peer, message) { * // do something with the inventory announcement * }); * pool.connect(); + * ``` * * @param {Network|String} network - The network to connect * @returns {Pool} diff --git a/lib/transport/rpc.js b/lib/transport/rpc.js index 6fcee3f..b297ae5 100644 --- a/lib/transport/rpc.js +++ b/lib/transport/rpc.js @@ -8,11 +8,13 @@ var https = require('https'); * server and enables simple and batch RPC calls. * * @example + * ```javascript * * var client = new RPC('user', 'pass'); * client.getInfo(function(err, info) { * // do something with the info * }); + * ``` * * @param {String} user - username used to connect bitcoind * @param {String} password - password used to connect bitcoind