From 470df32a0907da6d6d7504a1456bd80f03ef9a97 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 3 Jul 2015 13:59:45 -0300 Subject: [PATCH] add getPublicUrlForTx to blockchain explorer --- lib/blockchainexplorers/insight.js | 4 ++++ test/blockchainexplorer.js | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/blockchainexplorers/insight.js b/lib/blockchainexplorers/insight.js index f11e901..e436c9c 100644 --- a/lib/blockchainexplorers/insight.js +++ b/lib/blockchainexplorers/insight.js @@ -108,4 +108,8 @@ Insight.prototype.initSocket = function() { return socket; }; +Insight.prototype.getPublicUrlForTx = function(txid) { + return this.url + '/tx/' + txid; +}; + module.exports = Insight; diff --git a/test/blockchainexplorer.js b/test/blockchainexplorer.js index 097dfa0..0431c5a 100644 --- a/test/blockchainexplorer.js +++ b/test/blockchainexplorer.js @@ -20,6 +20,7 @@ describe('Blockchain explorer', function() { exp.should.respondTo('getAddressActivity'); exp.should.respondTo('getUnspentUtxos'); exp.should.respondTo('initSocket'); + exp.should.respondTo('getPublicUrlForTx'); var exp = new BlockchainExplorer({ provider: 'insight', network: 'livenet',