From 886f341479f65f3210e8c48e118fb263f10966b1 Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Wed, 26 Jul 2017 12:16:15 -0400 Subject: [PATCH 1/5] minor readme changes --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce714f6..a066cea 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# ![BTC RPC Explorer](public/img/logo/logo-64.png) +# ![BTC RPC Explorer](public/img/logo/logo-64.png) BTC RPC Explorer -# BTC RPC Explorer - -Simple, stateless Bitcoin blockchain explorer, via RPC. Build with Node.js, express, bootstrap-v4. +Simple, stateless Bitcoin blockchain explorer, via RPC. Built with Node.js, express, bootstrap-v4. This tool is intended to be a simple, stateless, self-hosted explorer for the Bitcoin blockchain, driven by RPC calls to your own bitcoind node. Because it is stateless, it is easy to run but lacks some (many?) of the features of other explorers. From f5c0a9b1257d3bb132e01fe73396ed8979db4d6d Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Fri, 28 Jul 2017 11:17:55 -0400 Subject: [PATCH 2/5] fix template errors for unconfirmed transactions --- views/transaction.pug | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/views/transaction.pug b/views/transaction.pug index a73f4f2..88ecb00 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -14,8 +14,10 @@ block content a(href="/") strong #{host} span :#{port} - li(class="breadcrumb-item") - a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height} + + if (result.getrawtransaction.blockhash) + li(class="breadcrumb-item") + a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height} li(class="breadcrumb-item active") Transaction h1(class="h2") Transaction @@ -61,7 +63,8 @@ block content th(class="table-active properties-header") Included in Block td a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash} - span(class="text-muted") (#{result.getblock.height}) + if (result.getblock && result.getblock.height) + span(class="text-muted") (#{result.getblock.height}) tr th(class="table-active properties-header") Timestamp @@ -107,8 +110,8 @@ block content tr th(class="table-active properties-header") Confirmations td - if (result.getrawtransaction.confirmations == 0) - strong(class="text-danger") #{result.getrawtransaction.confirmations} (Unconfirmed!) + if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0) + strong(class="text-danger") 0 (unconfirmed) else if (result.getrawtransaction.confirmations < 6) strong(class="text-warning") #{result.getrawtransaction.confirmations} else @@ -268,4 +271,4 @@ block content //pre #{JSON.stringify(result.txInputs, null, 4)} - \ No newline at end of file + From 528db7bc818a1895192efa205e10427c0bb05e8c Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Fri, 28 Jul 2017 11:58:58 -0400 Subject: [PATCH 3/5] more improvements to tx page for unconfirmed tx --- views/transaction.pug | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/views/transaction.pug b/views/transaction.pug index 88ecb00..03693e4 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -62,13 +62,21 @@ block content tr th(class="table-active properties-header") Included in Block td - a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash} - if (result.getblock && result.getblock.height) - span(class="text-muted") (#{result.getblock.height}) + if (result.getblock) + a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash} + if (result.getblock.height) + span(class="text-muted") (#{result.getblock.height}) + else + span N/A + span(class="text-muted") (unconfirmed) tr th(class="table-active properties-header") Timestamp - td #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) + if (result.getrawtransaction.time) + td #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) + else + td N/A + span(class="text-muted") (unconfirmed) //tr // th(class="table-active properties-header") Transaction ID From a0fb31740828bdb164e420d78790db3ac2a9b06b Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Fri, 28 Jul 2017 13:05:41 -0400 Subject: [PATCH 4/5] list of features in readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a066cea..91f06c1 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,14 @@ This tool is intended to be a simple, stateless, self-hosted explorer for the Bi 5. Navigate to http://127.0.0.1:3002/ 6. Connect using the RPC credentials for your target bitcoin node (if you didn't edit [env.js](app/env.js) in Step 3) +# Features + +* List of recent blocks +* Browse blocks by height, in ascending or descending order +* View block details +* View transaction details, with navigation backward via spent outputs +* View raw JSON output used to generate most pages + # Screenshots ### Connect via RPC @@ -37,5 +45,5 @@ This tool is intended to be a simple, stateless, self-hosted explorer for the Bi ### Transaction, Raw JSON # ![Connect](public/img/screenshots/transaction-raw.png) -### List of all Blocks +### List of Blocks by height (in ascending order) # ![Connect](public/img/screenshots/blocks.png) From 59ac8a9fd6224ce45c2cc54abab554daef392494 Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Fri, 28 Jul 2017 13:06:07 -0400 Subject: [PATCH 5/5] reorder readme sections --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 91f06c1..2e7c0ca 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ Simple, stateless Bitcoin blockchain explorer, via RPC. Built with Node.js, expr This tool is intended to be a simple, stateless, self-hosted explorer for the Bitcoin blockchain, driven by RPC calls to your own bitcoind node. Because it is stateless, it is easy to run but lacks some (many?) of the features of other explorers. +# Features + +* List of recent blocks +* Browse blocks by height, in ascending or descending order +* View block details +* View transaction details, with navigation backward via spent outputs +* View raw JSON output used to generate most pages + # Getting started ## Prerequisites @@ -20,14 +28,6 @@ This tool is intended to be a simple, stateless, self-hosted explorer for the Bi 5. Navigate to http://127.0.0.1:3002/ 6. Connect using the RPC credentials for your target bitcoin node (if you didn't edit [env.js](app/env.js) in Step 3) -# Features - -* List of recent blocks -* Browse blocks by height, in ascending or descending order -* View block details -* View transaction details, with navigation backward via spent outputs -* View raw JSON output used to generate most pages - # Screenshots ### Connect via RPC