update api for docs/index.md
This commit is contained in:
parent
df632f35c6
commit
d0af31938b
@ -1,4 +1,5 @@
|
|||||||
<img src="http://bitcore.io/css/images/bitcore-p2p.svg" alt="bitcore payment protocol" height="35" width="102">
|
<img src="http://bitcore.io/css/images/bitcore-p2p.svg" alt="bitcore payment protocol" height="35" width="102">
|
||||||
|
|
||||||
Bitcore P2P
|
Bitcore P2P
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ npm install bitcore-p2p --save
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var Peer = require('bitcore-p2p').Peer;
|
var Peer = require('bitcore-p2p').Peer;
|
||||||
var peer = new Peer('5.9.85.34');
|
var peer = new Peer({host: '5.9.85.34'});
|
||||||
|
|
||||||
// handle events
|
// handle events
|
||||||
peer.on('inv', function(message) {
|
peer.on('inv', function(message) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user