You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interface to the bitcoin P2P network for Cordova/Phonegap apps
Getting Started
Add the Plugin to your Cordova project: cordova plugin add https://github.com/getbitpocket/bitcore-p2p-cordova
Inside the index.html of your Cordova project add the script: <script type="text/javascript" src="cordova-bitcore.js"></script> (A better solution might be found in the future, which makes this obsolete, however for now it is problematic to automatically add browserified js files)
Example: Connecting to a Peer
varpeer=newbitcore.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();