Home

Awesome

Build Status

Interface to the bitcoin P2P network for Cordova/Phonegap apps

Getting Started

Example: Connecting to a Peer

var peer = new bitcore.p2p.Peer({host:'bitcoin-peer-ip'});

peer.on('ready',function(message) {
  console.log("version: " + peer.version + ", best height: " + peer.bestHeight);
});

peer.on('inv',function(message) {
  console.log("received inv message");
});

peer.connect();

Example: Connecting a Pool

var pool = new bitcore.p2p.Pool({
    network : 'testnet'
});

pool.on('peerready', function(peer) {
    console.log("Peer ready " + peer.host + ":" + peer.port);    
});

pool.connect();

Build

npm install
gulp build

Running Unit Tests

npm install
gulp test

Running Cordova Tests