From e39a0c6b3afc9983553360b8c2cad33875ad8a51 Mon Sep 17 00:00:00 2001 From: Jon Layton Date: Wed, 28 Mar 2018 06:55:02 +0000 Subject: [PATCH] BTCPify --- index.js | 11 +++++++---- package.json | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index df51133..51233ff 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var util = require('util'); var EventEmitter = require('events').EventEmitter; -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-btcp'); var spawn = require('child_process').spawn; function SatoshiFireAlarm(options) { @@ -12,9 +12,10 @@ function SatoshiFireAlarm(options) { this.alarmActivated = false; this.child = false; this.interestingAddresses = [ - '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', //this is the address that the genesis paid its coinbase to. Can't be spent due to a bug in the code. - '12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX', //Block 1 - '1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1' //Block 2 + //'1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', //this is the address that the genesis paid its coinbase to. Can't be spent due to a bug in the code. + //'12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX', //Block 1 + //'1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1' //Block 2 + 'b1RXUJgnuxtzHyJ5UTWerh4pNBWcVikESZe' ]; this.node.services.bitcoind.on('tx', this.transactionHandler.bind(this)); } @@ -88,6 +89,7 @@ SatoshiFireAlarm.prototype.soundAlarm = function() { } this.alarmActivated = true; + console.log('ALARM TRIGGERED!'); this.child = spawn('alarm', []); }; @@ -96,6 +98,7 @@ SatoshiFireAlarm.prototype.resetAlarm = function() { this.child.kill(); } this.alarmActivated = false; + console.log('ALARM OFF!'); }; module.exports = SatoshiFireAlarm; diff --git a/package.json b/package.json index 9f87613..36dbc87 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/bitpay/satoshi-fire-alarm.git" + "url": "git+https://github.com/BTCPrivate/address-watch.git" }, "keywords": [ "bitcore" @@ -16,11 +16,11 @@ "author": "BitPay", "license": "MIT", "bugs": { - "url": "https://github.com/bitpay/satoshi-fire-alarm/issues" + "url": "https://github.com/BTCPrivate/address-watch/issues" }, - "homepage": "https://github.com/bitpay/satoshi-fire-alarm#readme", + "homepage": "https://github.com/BTCPrivate/address-watch#readme", "private": true, "dependencies": { - "bitcore-lib": "^0.13.15" + "bitcore-lib-btcp": "BTCPrivate/bitcore-lib-btcp" } }