Compare commits

...

79 Commits

Author SHA1 Message Date
jahway603 534700aade Updated footer links to partially resolve Issue #2 1 month ago
D 640b74184c changed blocklist button to "blocks", updated footer links 3 months ago
D 6cfd55291d price fixes 3 months ago
D 0fe8ca9b03 update price script changes 3 months ago
D c588211ad4 added price updates, added styling for tx template 3 months ago
D c4b865e173 added links to buttons 3 months ago
D 921ec96c8b moving main.js 3 months ago
D 7b0eeed095 explorer overhaul 3 months ago
D fa56409f7c forgot a line 1 year ago
D 1149c463b1 fixed update_explorer_data.sh 1 year ago
D 1bd4654295 added ne wenv variable for root directory that contains the domain directory 1 year ago
D e223793a69 added $domain variable to update.pl 1 year ago
D bc81830120 fixed lack of single quotes in $ENV in perl script 1 year ago
D c9c72abfdc testing perl stuff 1 year ago
D 949b76abe4 fixing some hardcoding 1 year ago
D cc91c6dd5a using dragonx-cli instead of hush-cli 1 year ago
D e007c4ba6e added additional notes to README 1 year ago
D 336be40234 added some scripts for manual testing 1 year ago
D a67dabd148 cleaning up directory structure 1 year ago
D e3659291a7 fixed location of favicon 1 year ago
D f5053961a6 missed favicon on blocks template 1 year ago
D 19dffab015 fixed mroe missing links and added favicon 1 year ago
D 1ec999718f forgot link in desktop ver wallet btn 1 year ago
D dffccbc229 updated buttons on other template html files 1 year ago
D d6ba984118 updated alternate html for button links 1 year ago
D 3f3f238f16 updated wallet links 1 year ago
unknown b25532ecff tg 1 year ago
dan_s 27d0f8ad0d Merge pull request 'typo' (#1) from onryo into master 2 years ago
onryo b0535c1a69 typo 2 years ago
dan_s 6b10e414ac explorer now only looks 100 blocks in the past when generating new block info 2 years ago
dan_s 0224ab7d2c still not fixed yet 2 years ago
dan_s fbc0c9261c fixed double ticker in block info 2 years ago
dan_s f1a92673d2 testing ticker 2 years ago
dan_s d916154e3a testing ticker fix 2 years ago
dan_s b15d0d0c1f added ticker back to block info 2 years ago
dan_s 8138b6644d deleted t-address button 2 years ago
dan_s 96f1af5dee fixed ticker in block info 2 years ago
dan_s 0d2d32adbb removed dragonx.is, moved update.sh to explorer.dragonx.is dir 2 years ago
dan_s a1d7a68ecf fixed missing css 2 years ago
dan_s 04f39a1c2d finished css and mobile support for explorer 2 years ago
dan_s 4b66f78527 fixed some css 2 years ago
dan_s 9c4452c2b5 forgot ot remove some html stuff 2 years ago
dan_s 2561b52150 finished mobile support for block info 2 years ago
dan_s 20f2e42b5a added media queries for block info 2 years ago
dan_s ac8be8c416 changed color variables in pl code 2 years ago
dan_s aac0b2db62 adding yellow to shielded txs 2 years ago
dan_s 2b8b37ca8f block info css updated 2 years ago
dan_s ac0ec9dd59 testing css for txs 2 years ago
dan_s 1e0b6e0314 testing shieling status 2 years ago
dan_s cc8df52678 fixed variables 2 years ago
dan_s cf6dd64276 testing block info gen 2 years ago
dan_s 9897b0efdc testing pl 2 years ago
dan_s 10c1099f7c testing tx layout 2 years ago
dan_s 640779b46b fixed mobile css 2 years ago
dan_s c2e90ed888 finished styling blocks page 2 years ago
dan_s ae5ab0d4d3 reverted blocks changes 2 years ago
dan_s b086c96c4c moved blocks to css tab on main page 2 years ago
dan_s 796ff72909 styled blocks page 2 years ago
dan_s 05ad6da964 added hashrate to explorer 2 years ago
dan_s 60809bff4a added anonset rpc call to scripts and code 2 years ago
dan_s 71922404cc added info to html 2 years ago
dan_s 59c1eef62c added more info and graphics to website 2 years ago
dan_s 82da3fc1c5 cleaned up variables in perl code 2 years ago
dan_s d21de97e15 fixed wrong path in update_blocks_redis.pl 2 years ago
dan_s 1a1b4162f1 html changes 2 years ago
dan_s 98b6d9a67f fixed domain link in update_explorer 2 years ago
dan_s f51dff5919 fixed some css 2 years ago
dan_s 90a1b85eab added html and css for entire site, overhauled explorer design 2 years ago
dan_s b8d8ce07f3 fixed update.api to check the correct path to domain 2 years ago
dan_s 581b9ea65f restructured directories 2 years ago
dan_s 9da4f50c88 changes 2 years ago
dan_s 87c8e7dfe5 changed line 63 in update_blocks_redis.pl to force sym link creation if already exists 2 years ago
dan_s 6482917a4e added -ac_name where needed 2 years ago
dan_s 89bbeb413b added changes from siona repo 2 years ago
dan_s 4a5e8c48de added arguements where hush-cli is called to include -ac_name=DRAGONWX 2 years ago
dan_s 138652a510 changed location of ref to hush-cli 2 years ago
dan_s bf4d772fba changes to index.html 2 years ago
dan_s 9ff1e8cde8 replaced hush with dragonx 2 years ago
dan_s c2b8482546 changed variables to dragonx 2 years ago
  1. 3
      .gitignore
  2. 3
      .vscode/settings.json
  3. 48
      README.md
  4. 0
      explorer.dragonx.is/PID
  5. 0
      explorer.dragonx.is/address/template.html
  6. 181
      explorer.dragonx.is/addresses/template.html
  7. 0
      explorer.dragonx.is/api/anonset.json
  8. 0
      explorer.dragonx.is/api/coinsupply.json
  9. 0
      explorer.dragonx.is/api/getblockchain.json
  10. 0
      explorer.dragonx.is/api/getchaintips.json
  11. 0
      explorer.dragonx.is/api/getchaintxstats.json
  12. 0
      explorer.dragonx.is/api/getinfo.json
  13. 0
      explorer.dragonx.is/api/getmininginfo.json
  14. 0
      explorer.dragonx.is/api/gettxoutsetinfo.json
  15. 0
      explorer.dragonx.is/api/index.html
  16. 0
      explorer.dragonx.is/api/snapshots/snapshot-old.json
  17. 0
      explorer.dragonx.is/api/snapshots/snapshot.json
  18. 0
      explorer.dragonx.is/bin/HOWTO
  19. 0
      explorer.dragonx.is/bin/Makefile
  20. 0
      explorer.dragonx.is/bin/backup/update_blocks_redis.pl
  21. 11
      explorer.dragonx.is/bin/balances.pl
  22. 0
      explorer.dragonx.is/bin/block-340k.json
  23. 0
      explorer.dragonx.is/bin/example.html
  24. 0
      explorer.dragonx.is/bin/nope/README
  25. 0
      explorer.dragonx.is/bin/nope/update_addresses.pl
  26. 176
      explorer.dragonx.is/bin/regen_all_blocks_redis.pl
  27. 24
      explorer.dragonx.is/bin/update.pl
  28. 297
      explorer.dragonx.is/bin/update_blocks_redis.pl
  29. 160
      explorer.dragonx.is/block/template.html
  30. 49
      explorer.dragonx.is/blocks/template.html
  31. 6
      explorer.dragonx.is/crons/README
  32. 6
      explorer.dragonx.is/export_env.sh
  33. 162
      explorer.dragonx.is/index-1.html
  34. 0
      explorer.dragonx.is/index-new.html
  35. 0
      explorer.dragonx.is/index-prev.html
  36. 175
      explorer.dragonx.is/index.html
  37. BIN
      explorer.dragonx.is/logo_dragonx.ico
  38. BIN
      explorer.dragonx.is/logo_dragonx.png
  39. 90
      explorer.dragonx.is/main.js
  40. 175
      explorer.dragonx.is/template.html
  41. 65
      explorer.dragonx.is/tx/template.html
  42. 15
      explorer.dragonx.is/update-old.sh
  43. 16
      explorer.dragonx.is/update.sh
  44. 33
      explorer.dragonx.is/update_api.sh
  45. 19
      explorer.dragonx.is/update_explorer_data.sh
  46. 79
      explorer.dragonx.is/update_hashrate.sh
  47. 10
      explorer.dragonx.is/update_price.sh
  48. 1
      git/explorer.hush.land/yep
  49. 1
      git/hush3/yep
  50. 14
      update.sh
  51. 0
      var/www/explorer.hush.land/PID
  52. 337
      var/www/explorer.hush.land/bin/doesnotwork_update_addr.pl
  53. 7
      var/www/explorer.hush.land/bin/tmp.pl
  54. 13
      var/www/explorer.hush.land/update_api.sh
  55. 18
      var/www/explorer.hush.land/update_explorer_data.sh
  56. 78
      var/www/explorer.hush.land/var/www/explorer.hush.land/addresses/template.html
  57. 101
      var/www/explorer.hush.land/var/www/explorer.hush.land/block/template.html
  58. 77
      var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/template.html
  59. 125
      var/www/explorer.hush.land/var/www/explorer.hush.land/index-1.html
  60. 125
      var/www/explorer.hush.land/var/www/explorer.hush.land/index.html
  61. 125
      var/www/explorer.hush.land/var/www/explorer.hush.land/template.html
  62. 85
      var/www/explorer.hush.land/var/www/explorer.hush.land/tx/template.html
  63. 15
      var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh

3
.gitignore

@ -0,0 +1,3 @@
/.vscode
/explorer.dragonx.is/api/hashrate.json
/explorer.dragonx.is/api/hashrate100.json

3
.vscode/settings.json

@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}

48
README.md

@ -1,7 +1,47 @@
# explorer.hush.land
# Siona
This is Siona, a maximum privacy block explorer designed for chains which support zaddrs
and which runs <a href="https://explorer.hush.is">explorer.hush.is</a> and <a href="https://explorer.hush.land">explorer.hush.land</a>.
It is written in Perl 5 and generates static HTML with no Javascript and basic inline CSS for styling. It requires a Redis server
running on localhost, which is for caching and reduces disk i/o.
# Installing dependencies
Requires JSON::Any and Redis Perl modules and redis-server an Debian package.
Use Cpan Minus to install Perl Modules:
```sudo apt install cpanminus```
```cpanm JSON::Any``` & ```cpanm Redis```
install jq:
```sudo apt-get install jq```
# Instructions
Assume you put `update.sh` in /home/$USER and your Hush source code in ~/git/hush3 , add this to your $USER crontab with `crontab -e` :
```
# set env vars that Siona will use
SIONA_DOMAIN=explorer.some.poop
SIONA_ACNAME=GAZOOTZ
SIONA_CLI=~/git/hush3/src/hush-cli -ac_NAME=${SIONA_ACNAME}
# update explorer data every 5 minutes
*/5 * * * * ~/update.sh
```
crontab -l
*/5 * * * * cd /home/hush && ./update.sh
```
# additional Notes
when running export_env.sh for manual testing, run the script as source. This assigns the env variables to the current shell.
```source ./export_env.sh ``` or ```. ./export_env.sh``` for shorthand
use ```sudo -E``` to preserve env variables if sudo is needed
# Copyright
2016-2023 The Hush Developers
# License
GPLv3

0
var/www/explorer.hush.land/var/www/explorer.hush.land/PID → explorer.dragonx.is/PID

0
var/www/explorer.hush.land/var/www/explorer.hush.land/address/template.html → explorer.dragonx.is/address/template.html

181
explorer.dragonx.is/addresses/template.html

@ -0,0 +1,181 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body {
background-color: #101010;
max-width: 850px;
margin: auto;
font-family: 'Ubuntu Mono';
color: #b3b3b3;
text-align: center
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 15px
}
td {
border: 1px solid #1a1a1a;
font-size: 16px;
padding: 0.5em
}
td:hover {
background-color: #1a1a1a
}
pre {
background-color: #0d0d0d;
border: 1px solid #1a1a1a;
font-size: 6px;
padding: 15px;
color: #e6e6e6
}
details {
cursor: pointer;
background-color: #0d0d0d;
text-align: left;
margin-top: 15px;
padding: 0.5em;
border: 1px solid #1a1a1a;
font-size: 13px;
word-wrap: break-word
}
summary {
outline: none;
padding: 0.4em
}
.blockt {
border: 1px solid #1a1a1a;
padding: 0.15em;
background-color: #0d0d0d;
margin-top: 15px;
text-align: left;
font-size: 13px;
word-wrap: break-word
}
.blockt p {
padding-left: 0.7em;
padding-right: 0.7em
}
.button:link {
float: right;
font-size: 11px
}
.mainlinkexplorer:link {
text-decoration: dotted underline;
text-underline-position: under
}
.mainlinkexplorer:hover {
text-decoration: none;
color: #595959
}
.links {
margin: 15px;
font-size: 13px
}
a:link {
color: #b3b3b3;
text-decoration: none
}
a:visited {
color: #b3b3b3
}
a:hover {
color: #b3b3b3
}
* {
scrollbar-width: thin;
scrollbar-color: #333333 #101010
}
::-webkit-scrollbar {
width: 6px
}
::-webkit-scrollbar-thumb {
background: #333333
}
@font-face {
font-family: 'Ubuntu Mono';
src: url('../UbuntuMono.ttf') format('truetype')
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<div class="blockt">
<p>These addresses have NO PRIVACY! They really should move funds to a zaddr!</p>
</div>
#ADDRESS_DATA#
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span
style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span
style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span
style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span
style="color: #262626">]</span></a>
</div>
</body>
</html>

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/anonset.json → explorer.dragonx.is/api/anonset.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/coinsupply.json → explorer.dragonx.is/api/coinsupply.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getblockchain.json → explorer.dragonx.is/api/getblockchain.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintips.json → explorer.dragonx.is/api/getchaintips.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getchaintxstats.json → explorer.dragonx.is/api/getchaintxstats.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getinfo.json → explorer.dragonx.is/api/getinfo.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/getmininginfo.json → explorer.dragonx.is/api/getmininginfo.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/gettxoutsetinfo.json → explorer.dragonx.is/api/gettxoutsetinfo.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/index.html → explorer.dragonx.is/api/index.html

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot-old.json → explorer.dragonx.is/api/snapshots/snapshot-old.json

0
var/www/explorer.hush.land/var/www/explorer.hush.land/api/snapshots/snapshot.json → explorer.dragonx.is/api/snapshots/snapshot.json

0
var/www/explorer.hush.land/bin/HOWTO → explorer.dragonx.is/bin/HOWTO

0
var/www/explorer.hush.land/bin/Makefile → explorer.dragonx.is/bin/Makefile

0
var/www/explorer.hush.land/bin/backup/update_blocks_redis.pl → explorer.dragonx.is/bin/backup/update_blocks_redis.pl

11
var/www/explorer.hush.land/bin/balances.pl → explorer.dragonx.is/bin/balances.pl

@ -7,11 +7,14 @@ $|=1;
# While Siona swims, we pave with bricks on the road she will run on...
my $STATS = {};
my $dir = shift || '/var/www/explorer.hush.land/var/www/explorer.hush.land/api';
my $acname = $ENV{SIONA_ACNAME} || 'DRAGONX';
my $ticker = $acname eq 'HUSH3' ? 'DRGX' : $acname;
my $domain = $ENV{'SIONA_DOMAIN'};
my $rootdir = $ENV{'SIONA_ROOT_DIR'};
my $dir = shift || "/var/www/$rootdir/$domain/api";
my $getinfo = readfile("$dir/getinfo.json");
my $coinsupply = readfile("$dir/coinsupply.json");
my $noprivacy = readfile("$dir/snapshots/snapshot.json");
my $template = readfile("/var/www/explorer.hush.land/var/www/explorer.hush.land/addresses/template.html");
my $template = readfile("/var/www/$rootdir/$domain/addresses/template.html");
my @symbols = qw/ BLOCKS CONNECTIONS TLS_CONNECTIONS TXCOUNT
PROTOCOLVERSION LONGESTCHAIN TIPTIME NOTARIZEDHASH
ADDRESS_DATA TOTAL_ADDRESSES TOTAL AVG UTXOS
@ -41,7 +44,7 @@ if ($noprivacy) {
$STATS->{ADDRESS_DATA} .= <<ROW;
<tr>
<td style="font-size: 14px">$addr</td>
<td style="font-size: 14px">$amount HUSH</td>
<td style="font-size: 14px">$amount $ticker</td>
</tr>
ROW
}

0
var/www/explorer.hush.land/bin/block-340k.json → explorer.dragonx.is/bin/block-340k.json

0
var/www/explorer.hush.land/bin/example.html → explorer.dragonx.is/bin/example.html

0
var/www/explorer.hush.land/bin/nope/README → explorer.dragonx.is/bin/nope/README

0
var/www/explorer.hush.land/bin/nope/update_addresses.pl → explorer.dragonx.is/bin/nope/update_addresses.pl

176
var/www/explorer.hush.land/bin/update_blocks_redis.pl → explorer.dragonx.is/bin/regen_all_blocks_redis.pl

@ -15,15 +15,17 @@ my $j = JSON::Any->new;
#sleep 10;
# While Siona swims, we pave with bricks on the road she will run on...
my $acname = $ENV{SIONA_ACNAME} || 'HUSH';
my $domain = $ENV{SIONA_DOMAIN} || 'explorer.hush.land';
my $root = "/var/www/$domain";
my $basedir = "/var/www/$domain/var/www/$domain";
my $dir = shift || "$basedir/api";
my $cli = $ENV{SIONA_CLI} || "/home/hush/git/hush3/src/hush-cli";
my $getinfo = readfile("$dir/getinfo.json");
my $mining = readfile("$dir/getmininginfo.json");
my $blocksdir = "$basedir/blocks";
my $acname = $ENV{SIONA_ACNAME} || 'DRAGONX';
# my $ticker = $acname eq 'DRAGONX' ? 'DRGX' : $acname;
my $ticker = 'DRGX';
my $domain = $ENV{'SIONA_DOMAIN'};
my $rootdir = $ENV{'SIONA_ROOT_DIR'};
my $root = "/var/www/$rootdir/$domain";
my $cli = $ENV{SIONA_CLI} || "/git/hush3/src/hush-cli";
my $getinfo = readfile("$root/api/getinfo.json");
my $mining = readfile("$root/api/getmininginfo.json");
my $blocksdir = "$root/blocks";
my $template = readfile("$blocksdir/template.html");
if($getinfo =~ m/"blocks": (\d+)/){ $STATS->{BLOCKS} ||= $1; }
if($getinfo =~ m/"tls_connections": (\d+)/){ $STATS->{TLS_CONNECTIONS} ||= $1; }
@ -39,13 +41,14 @@ $STATS->{BLOCKS_TABLE} = "";
$STATS->{TX_TABLE} = "";
my $mineraddress = "";
for my $h ($height-80 .. $height) {
# for my $h (1 .. $height) {
for my $h (0 .. $height) {
#for my $h (910265 .. 910270) {
#last if($h < 0);
my $thisminer = "";
# TODO: actually look at the block reward for this height via
# the tx data from the very first txid in this block
my $reward = $h > 340000 ? "3.125 $acname" : "12.5 $acname";
my $reward = $h > 340000 ? "3 $ticker" : "3 $ticker";
my $block = get_block($h);
#die Dumper $block;
my $time = $block->{time};
@ -53,13 +56,13 @@ for my $h ($height-80 .. $height) {
my @txs = @{ $block->{tx} };
my $numtx = @txs;
# TODO: look on filesystem first? redis cache?
my $hash = qx!$cli getblockhash $h!;
my $hash = qx!$cli -ac_name=$acname getblockhash $h!;
chomp $hash;
my $blockdir = "$root/var/www/$domain/block/$hash";
my $blockdir = "$root/block/$hash";
if (!-e "$root/block/$h") {
# make /block/HEIGHT work
my $cmd = "ln -s $blockdir $root/var/www/$domain/block/$h";
my $cmd = "ln -s $blockdir $root/block/$h";
qx{$cmd};
warn $cmd;
}
@ -68,7 +71,9 @@ for my $h ($height-80 .. $height) {
my $cmd = "mkdir -p $blockdir";
qx{$cmd};
warn $cmd;
my $block_template_file = "$basedir/block/template.html";
# my $block_template_file = "$root/template.html";
my $block_template_file = "$root/block/template.html";
# my $new_block_file = "$root/index.html";
my $new_block_file = "$blockdir/index.html";
# TODO: process template with block details
my $block_template = readfile($block_template_file);
@ -84,7 +89,7 @@ for my $h ($height-80 .. $height) {
$block_template =~ s/#MERKLEROOT#/$block->{merkleroot}/ge;
$block_template =~ s/#FINALSAPLINGROOT#/$block->{finalsaplingroot}/ge;
# TODO: fix block reward
my $blockreward = "3.125 $acname";
my $blockreward = "3 $ticker";
$block_template =~ s/#BLOCKREWARD#/$blockreward/g;
$block_template =~ s/#BLOCKNONCE#/$block->{nonce}/ge;
$block_template =~ s/#DIFFICULTY#/$block->{difficulty}/ge;
@ -99,7 +104,7 @@ HTML
my $txi = 0;
for my $tx (@txs) {
my $json = qx!$cli getrawtransaction $tx 1!;
my $json = qx!$cli -ac_name=$acname getrawtransaction $tx 1!;
# "vout": 0,
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj",
# address is duplicated in the JSON of getrawtransaction !! fuck.
@ -121,9 +126,9 @@ HTML
next if $@;
$TX->{$tx} = $o;
my $tx_dir = "$root/var/www/$domain/tx/$tx";
my $tx_file = "$root/var/www/$domain/tx/$tx/index.html";
my $tx_template_file = "$root/var/www/$domain/tx/template.html";
my $tx_dir = "$root/tx/$tx";
my $tx_file = "$root/tx/$tx/index.html";
my $tx_template_file = "$root/tx/template.html";
my $tx_template = readfile($tx_template_file);
my $txtime = localtime($o->{time});
#my $txsize = $o->{size} . " bytes";
@ -168,20 +173,26 @@ HTML
$vins-- if ($vin->[0] && $vin->[0]->{coinbase});
my $tx_data =<<DATA;
<tr>
<td style="font-size: 14px; width: 50%">Coinbase: $coinbase</td>
<td style="font-size: 14px; width: 50%">Locktime: $locktime</td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Transparent Inputs: $vins </td>
<td style="font-size: 14px; width: 50%">Transparent Outputs: $vouts </td>
</tr>
<tr>
<td style="font-size: 14px; width: 50%">Shielded Inputs: $zins </td>
<td style="font-size: 14px; width: 50%">Shielded Outputs: $zouts </td>
</tr>
<div class="tx-transaction">
<div class="tx-container">
<div class="tx-coinbase-locktime">
<div class="tx-coinbase"><h3>Coinbase</h3><span>$coinbase</span></div>
<div class="tx-locktime"><h3>Locktime</h3><span>$locktime</span></div>
</div>
<div class="tx-tz-io">
<div class="tx-t-io">
<div class="tx-io-info"><h3>Transparent Inputs:</h3><span>$vins</span></div>
<div class="tx-io-info"><h3>Transparent Outputs:</h3><span>$vouts</span></div>
</div>
<div class="tx-z-io">
<div class="tx-io-info"><h3>Shielded Inputs:</h3><span>$zins</span></div>
<div class="tx-io-info"><h3>Shielded Outputs:</h3><span>$zouts</span></div>
</div>
</div>
</div>
</div>
DATA
$tx_template =~ s/#TX_DATA#/$tx_data/g;
@ -230,8 +241,11 @@ DATA
}
#if($vouts>0) { $txtype = "DPoW"; }
my $stuff;
my $txOutline = "rgba(255, 0, 0, 0.5)";
my $txBG = "rgba(255, 0, 0, 0.1)";
if ($txtype eq "Mining") {
$txOutline = "rgba(255, 0, 0, 0.5)";
$txBG = "rgba(255, 0, 0, 0.1)";
$stuff =<<STUFF;
=> $to (miner)
@ -239,12 +253,16 @@ DATA
=> $to2 (FR address)
STUFF
} elsif ($txtype eq "Shielding") {
$txOutline = "rgba(255, 204, 0, 0.6)";
$txBG = "rgba(255, 204, 0, 0.1)";
$stuff =<<STUFF;
$from ($valueBalanceThird $acname) => zs1??? (shielding)
$from ($valueBalanceThird $ticker) => zs1??? (shielding)
STUFF
} elsif ($txtype eq "Notary") {
$txOutline = "rgba(255, 204, 0, 0.6)";
$txBG = "rgba(255, 204, 0, 0.1)";
$stuff =<<STUFF;
zs1??? => $to3 (notary)
@ -253,6 +271,8 @@ zs1??? => zs1??? (shielded change)
STUFF
} elsif ($txtype eq "dPoW") {
$txOutline = "rgba(255, 204, 0, 0.6)";
$txBG = "rgba(255, 204, 0, 0.1)";
$stuff =<<STUFF;
=> $to2 (FR address)
@ -261,6 +281,8 @@ STUFF
STUFF
} else {
$txBG = "rgba(0, 255, 8, 0.1)";
$txOutline = "rgba(0, 255, 8, 0.5)";
$stuff =<<STUFF;
$from => zs1??? (fully shielded)
@ -268,19 +290,44 @@ $from => zs1??? (fully shielded)
STUFF
}
my $tx_table = <<HTML;
<table>
<tr>
<td style="font-size: 14px"><a href="/tx/$tx" class="mainlinkexplorer">$tx</a></td>
<td style="font-size: 14px">vins: $vins, vouts: $vouts</td>
<td style="font-size: 14px">zins: $zins, zouts: $zouts</td>
</tr>
<tr>
<td style="font-size: 14px">$stuff</td>
<td style="font-size: 14px">$txtime</td>
<td style="font-size: 14px">$valueBalance $acname</td>
</tr>
</table>
my $tx_table = <<HTML;
<div class="transaction">
<div class="shielded" style="--shielded-bg: ${txBG}; --shielded-col: ${txOutline};">
<span>$txtype</span>
</div>
<div class="tx-container-top" style="--tx-outline: ${txOutline}; --tx-border-bot: none;">
<h3>Transaction</h3>
<div class="tx-reward">${valueBalance} DRGX</div>
<span>$txtime</span>
<div class="tx-id-bar">
<h3>TX ID</h3>
<span class=""><a href="/tx/$tx">$tx</a></span>
</div>
<div class="tx-id-bar" style="--miner-id-margin: 17.5vh">
<h3>Miner</h3>
<span class="">$to</span>
</div>
</div>
<div class="tx-container-bot" style="--tx-outline: ${txOutline}; --tx-border-top: none;">
<div class="tx-in-out" style="--tx-io-margin-L: 45vh; --tx-io-margin-L-mobile: 2vh;">
<div class="v-in-out">
<h3 style="--v-mg-top: -4vh; --v-mg-l: -12vh; --just-con: right;">Zins</h3>
<h3 style="--v-mg-top: 1.5vh; --v-mg-l: -12vh; --just-con: right;">Zouts</h3>
<h3 class="in-out-num" style="--v-mg-top: -5vh; --v-mg-l: -1vh; --just-con: center;">$zins</h3>
<h3 class="in-out-num" style="--v-mg-top: 0.5vh; --v-mg-l: -1vh; --just-con: center;">$zouts</h3>
</div>
</div>
<div class="tx-in-out" style="--tx-io-margin-L: 25vh; --tx-io-margin-L-mobile: 19.5vh;">
<div class="v-in-out">
<h3 style="--v-mg-top: -4vh; --v-mg-l: -12vh; --just-con: right;">Vins</h3>
<h3 style="--v-mg-top: 1.5vh; --v-mg-l: -12vh; --just-con: right;">Vouts</h3>
<h3 class="in-out-num" style="--v-mg-top: -5vh; --v-mg-l: -1vh; --just-con: center;">$vins</h3>
<h3 class="in-out-num" style="--v-mg-top: 0.5vh; --v-mg-l: -1vh; --just-con: center;">$vouts</h3>
</div>
</div>
</div>
</div>
HTML
$STATS->{TX_TABLE} .= $tx_table;
$txi++;
@ -319,7 +366,7 @@ HTML
sub get_raw {
my $tx = shift;
my $cmd = "$cli getrawtransaction $tx 1";
my $cmd = "$cli -ac_name=$acname getrawtransaction $tx 1";
warn $cmd;
my $json = qx!$cmd!;
# "vout": 0,
@ -331,7 +378,12 @@ sub get_raw {
$json =~ s/"address":\w+"([a-z0-9]+)"(.+)"address":\w+"\g1"(.+)/"address": "$1"$2/mg;
warn "decoding tx=$tx"; # with json=$json";
my $j = JSON::Any->new;
my $o = $j->decode($json);
my $o ="";
eval {
$o = $j->decode($json);
};
return $o;
}
@ -345,18 +397,14 @@ for my $b (reverse @blocks) {
$duration = "--" unless $duration;
$STATS->{BLOCKS_TABLE} .= <<"FUCK";
<table>
<tr>
<td style="font-size: 14px"><a href="/block/$height/" class="mainlinkexplorer">$height</a></td>
<td style="font-size: 14px"><a href="/block/$hash/" class="mainlinkexplorer">$hash</a></td>
<td style="font-size: 14px">$time</td>
</tr>
<tr>
<td style="font-size: 14px">${duration}s</td>
<td style="font-size: 14px">$miner + $reward</td>
<td style="font-size: 14px">Transactions: $txs</td>
</tr>
</table>
<div class="explorer-blocks-bar">
<a href="/block/$height/" class="block-height">$height</a>
<span href="/block/$height/" class="block-duration">${duration}s</span>
<a href="/block/$hash/" class="block-hash">$hash</a>
<span href="/block/$height/" class="block-miner-reward">$miner + $reward</span>
<span href="/block/$height/" class="block-time">$time</span>
<span href="/block/$height/" class="block-txs">Transactions: $txs</span>
</div>
FUCK
}
@ -382,7 +430,7 @@ sub get_block {
# create data if it's not there
if( $block =~ m/^HASH/ || length($block) == 0 ) {
my $cmd = "$cli getblock $height";
my $cmd = "$cli -ac_name=$acname getblock $height";
warn $cmd;
$block = qx/$cmd/;
}

24
var/www/explorer.hush.land/bin/update.pl → explorer.dragonx.is/bin/update.pl

@ -2,31 +2,40 @@
use strict;
use warnings;
use 5.014;
use Redis;
my $r = Redis->new;
my $anonset = $r->get("anonset");
my $hashps = $r->get("hashps");
my $price = $r->get("price");
my $STATS = {};
$|=1;
my $domain = $ENV{'SIONA_DOMAIN'};
my $rootdir = $ENV{'SIONA_ROOT_DIR'};
# give rpc's a chance to finish before us in cron
sleep 30;
# While Siona swims, we pave with bricks on the road she will run on...
# my $dir = shift || $ENV{HOME} . "/data";
my $dir = shift || '/var/www/explorer.hush.land/var/www/explorer.hush.land/api';
my $dir = shift || "/var/www/$rootdir/$domain/api";
my $getinfo = readfile("$dir/getinfo.json");
my $mining = readfile("$dir/getmininginfo.json");
my $txstats = readfile("$dir/getchaintxstats.json");
# run the slowest last so the RPC interface isn't juggling
my $coinsupply = readfile("$dir/coinsupply.json");
my $template = readfile("/var/www/explorer.hush.land/var/www/explorer.hush.land/template.html");
my $template = readfile("/var/www/$rootdir/$domain/template.html");
#say $template;
#warn "<!--" . $STATS->{TLS_CONNECTIONS} . "/" . $STATS->{CONNECTIONS} . " peers connected via TLS -->";
my @symbols = qw/
BLOCKS CONNECTIONS TLS_CONNECTIONS TXCOUNT
NOTARIZED ZFUNDS SUPPLY DIFFICULTY NETWORKSOLPS
NOTARIZED ZFUNDS SUPPLY DIFFICULTY HASHPS
PROTOCOLVERSION LONGESTCHAIN TIPTIME NOTARIZEDHASH
NOTARIZEDHEIGHT BLOCKHASH TXRATE
NOTARIZEDHEIGHT BLOCKHASH TXRATE PRICE
/;
#if ($getinfo && $mining && $txstats && $coinsupply) {
@ -36,6 +45,9 @@ my @symbols = qw/
# derived stat
my $zpct = sprintf "%.3f", ($STATS->{SUPPLY} || 0) > 0 ? 100*($STATS->{ZFUNDS}/$STATS->{SUPPLY}) : "0.000";
$template =~ s/#ZFUNDS_PERCENT#/$zpct/ge;
$template =~ s/#ANONSET#/$anonset/ge;
$template =~ s/#HASHPS#/$hashps/ge;
$template =~ s/#PRICE#/$price/ge;
say $template;
@ -61,7 +73,7 @@ sub readfile {
if(m/"total": (\d+\.\d+)/){ $STATS->{SUPPLY} ||= sprintf("%8.8f", $1); }
# getmininginfo
if(m/"difficulty": (\d+)/){ $STATS->{DIFFICULTY} ||= $1; }
if(m/"networksolps": (\d+)/){ $STATS->{NETWORKSOLPS} ||= sprintf("%.2f", $1 / 1_000_000); }
if(m/"networksolps": (\d+)/){ $STATS->{HASHPS} ||= sprintf("%.2f", $1 / 1_000_000); }
# getchaintxstats
if(m/"txcount": (\d+)/){ $STATS->{TXCOUNT} ||= $1; }
if(m/"txrate": (\d+\.\d+)/){ $STATS->{TXRATE} ||= sprintf("%.4f",$1*60); }

297
var/www/explorer.hush.land/bin/update_blocks.pl → explorer.dragonx.is/bin/update_blocks_redis.pl

@ -3,21 +3,30 @@ use strict;
use warnings;
use JSON::Any;
use Data::Dumper;
use Redis;
use 5.014;
my $STATS = {};
$|=1;
my $TX = {};
my $r = Redis->new;
my $j = JSON::Any->new;
#sleep 10;
# While Siona swims, we pave with bricks on the road she will run on...
my $dir = shift || '/var/www/explorer.hush.is/api/';
my $cli = "/home/duke/git/hush3/src/hush-cli";
my $getinfo = readfile("$dir/getinfo.json");
my $mining = readfile("$dir/getmininginfo.json");
my $template = readfile("/var/www/explorer.hush.is/blocks/template.html");
my $blocksdir = "/var/www/explorer.hush.is/blocks/";
my $acname = $ENV{SIONA_ACNAME} || 'DRAGONX';
# my $ticker = $acname eq 'DRAGONX' ? 'DRGX' : $acname;
my $ticker = 'DRGX';
my $domain = $ENV{'SIONA_DOMAIN'};
my $rootdir = $ENV{'SIONA_ROOT_DIR'};
my $root = "/var/www/$rootdir/$domain";
my $cli = $ENV{SIONA_CLI} || "/git/hush3/src/hush-cli";
my $getinfo = readfile("$root/api/getinfo.json");
my $mining = readfile("$root/api/getmininginfo.json");
my $blocksdir = "$root/blocks";
my $template = readfile("$blocksdir/template.html");
if($getinfo =~ m/"blocks": (\d+)/){ $STATS->{BLOCKS} ||= $1; }
if($getinfo =~ m/"tls_connections": (\d+)/){ $STATS->{TLS_CONNECTIONS} ||= $1; }
if($getinfo =~ m/"connections": (\d+)/){ $STATS->{CONNECTIONS} ||= $1; }
@ -27,26 +36,29 @@ my @symbols = qw/
TX_TABLE BLOCKS_TABLE TLS_CONNECTIONS CONNECTIONS PROTOCOLVERSION
/;
my @blocks = ();
my $height = $STATS->{BLOCKS};
my $height = $STATS->{BLOCKS} || 0;
$STATS->{BLOCKS_TABLE} = "";
$STATS->{TX_TABLE} = "";
my $NUM_BLOCKS = 50;
my $mineraddress = "";
for my $h ($height-$NUM_BLOCKS .. $height) {
# for my $h (1 .. $height) {
for my $h ($height-100 .. $height) {
#for my $h (910265 .. 910270) {
#last if($h < 0);
my $thisminer = "";
# TODO: fix this garbage
my $reward = $h > 340000 ? "3.125 HUSH" : "12.5 HUSH";
# TODO: actually look at the block reward for this height via
# the tx data from the very first txid in this block
my $reward = $h > 340000 ? "3 $ticker" : "3 $ticker";
my $block = get_block($h);
#die Dumper $block;
my $time = $block->{time};
die Dumper [ $block ] unless $block->{time} and $block->{tx};
my @txs = @{ $block->{tx} };
my $numtx = @txs;
# TODO: look on filesystem first? redis cache?
my $hash = qx!$cli getblockhash $h!;
my $hash = qx!$cli -ac_name=$acname getblockhash $h!;
chomp $hash;
my $root = "/var/www/explorer.hush.is";
my $blockdir = "$root/block/$hash";
if (!-e "$root/block/$h") {
# make /block/HEIGHT work
@ -59,8 +71,10 @@ for my $h ($height-$NUM_BLOCKS .. $height) {
my $cmd = "mkdir -p $blockdir";
qx{$cmd};
warn $cmd;
# my $block_template_file = "$root/template.html";
my $block_template_file = "$root/block/template.html";
my $new_block_file = "$root/block/$hash/index.html";
# my $new_block_file = "$root/index.html";
my $new_block_file = "$blockdir/index.html";
# TODO: process template with block details
my $block_template = readfile($block_template_file);
$block_template =~ s/#BLOCKS#/$h/g;
@ -74,8 +88,9 @@ for my $h ($height-$NUM_BLOCKS .. $height) {
$block_template =~ s/#CHAINWORK#/$block->{chainwork}/ge;
$block_template =~ s/#MERKLEROOT#/$block->{merkleroot}/ge;
$block_template =~ s/#FINALSAPLINGROOT#/$block->{finalsaplingroot}/ge;
# TODO
$block_template =~ s/#BLOCKREWARD#/3.125 HUSH/g;
# TODO: fix block reward
my $blockreward = "3 $ticker";
$block_template =~ s/#BLOCKREWARD#/$blockreward/g;
$block_template =~ s/#BLOCKNONCE#/$block->{nonce}/ge;
$block_template =~ s/#DIFFICULTY#/$block->{difficulty}/ge;
$block_template =~ s/#NUM_TXS#/$numtx/g;
@ -83,22 +98,13 @@ for my $h ($height-$NUM_BLOCKS .. $height) {
my $txtype = "";
# generate tx list table
$STATS->{TX_TABLE}=<<HTML;
<table border=1>
<tr><th>Transaction ID (txid)</th><th>Type</th><th>Inputs</th>
<th>Outputs</th><th>Shielded Inputs</th><th>Shielded Outputs</th>
<th>Addresses</th>
<th>Amount</th>
<th>Transaction Time</th>
<!--
<th>Expiry Height</th>
<th>Lock Time</th>
-->
</tr>
HTML
my $txi = 0;
for my $tx (@txs) {
my $json = qx!$cli getrawtransaction $tx 1!;
my $json = qx!$cli -ac_name=$acname getrawtransaction $tx 1!;
# "vout": 0,
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj",
# address is duplicated in the JSON of getrawtransaction !! fuck.
@ -109,24 +115,34 @@ HTML
$json =~ s/"address":\w+"([a-z0-9]+)"(.+)"address":\w+"\g1"(.+)/"address": "$1"$2/mg;
warn "decoding tx=$tx"; # with json=$json";
# add tx json to Redis, indexed by txid
$r->set("tx:$tx", $json);
my $j = JSON::Any->new;
my $o = $j->decode($json);
my $o;
eval {
$o = $j->decode($json);
};
next if $@;
$TX->{$tx} = $o;
my $tx_dir = "$root/tx/$tx";
my $tx_file = "$root/tx/$tx/index.html";
my $tx_template_file = "$root/tx/template.html";
my $tx_template = readfile($tx_template_file);
my $txtime = localtime($o->{time}) . " UTC ( " . $o->{time} . " )";
my $txtime = localtime($o->{time});
#my $txsize = $o->{size} . " bytes";
$tx_template =~ s/#TXID#/$tx/ge;
$tx_template =~ s/#TXTIME#/$txtime/ge;
#$tx_template =~ s/#TXSIZE#/$txsize/g;
$tx_template =~ s/#BLOCKHEIGHT#/$h/ge;
$tx_template =~ s/#BLOCKHASH#/$hash/ge;
$tx_template =~ s/#BLOCKHASH#/$hash/ge;
my ($vin,$vout,$zin,$zout) = ($o->{vin},$o->{vout},$o->{vShieldedSpend},$o->{vShieldedOutput});
my $expiryheight = $o->{expiryheight} == 0 ? "Default" : $o->{expiryheight};
my $locktime = localtime($o->{locktime}) . " UTC ( " . $o->{locktime} . " )";
my $locktime = localtime($o->{locktime});
my $valueBalance = $o->{valueBalance} || "?";
my $valueBalanceSecond = $o->{valueBalance};
my $valueBalanceThird = abs($valueBalanceSecond);
# "vShieldedOutput": [
# {
# "cv": "61e0fed3b97e08e442408c7efc4058a9116695e6e28a22c0fbf0987fdfbcdd27",
@ -157,16 +173,24 @@ HTML
$vins-- if ($vin->[0] && $vin->[0]->{coinbase});
my $tx_data =<<DATA;
<table border=1>
<tr><th>Coinbase</th><td align=center>$coinbase</td></tr>
<tr><th>Expiry Height</th><td align=center>$expiryheight</td></tr>
<tr><th>Transparent Inputs</th><td align=center> $vins </td></tr>
<tr><th>Transparent Outputs</th><td align=center> $vouts </td></tr>
<tr><th>Shielded Inputs</th><td align=center> $zins </td></tr>
<tr><th>Shielded Outputs</th><td align=center> $zouts </td></tr>
<tr><th>Locktime</th><td align=center>$locktime</td></tr>
</table>
<div class="tx-transaction flex-center flex-col">
<div class="flex-center flex-col">
<div class="flex-center flex-col"><h3>Coinbase</h3><span>$coinbase</span></div>
<div class="flex-center flex-col"><h3>Locktime</h3><span>$locktime</span></div>
</div>
<div class="flex-center flex-col">
<div class="flex-center flex-col">
<div class="flex-center flex-col"><h3>Transparent Inputs:</h3><span>$vins</span></div>
<div class="flex-center flex-col"><h3>Transparent Outputs:</h3><span>$vouts</span></div>
</div>
<div class="flex-center flex-col">
<div class="flex-center flex-col"><h3>Shielded Inputs:</h3><span>$zins</span></div>
<div class="flex-center flex-col"><h3>Shielded Outputs:</h3><span>$zouts</span></div>
</div>
</div>
</div>
DATA
$tx_template =~ s/#TX_DATA#/$tx_data/g;
@ -183,6 +207,7 @@ DATA
my $from = $o->{vin}->[0] ? $o->{vin}->[0]->{address} : "zs1???";
#my $to = $o->{vout}->[0] ? $o->{vout}->[0]->{scriptPubKey}->{addresses}->[0] : "zs1???";
my $to2 = "";
my $to3 = "";
# only look at coinbase tx's
if($txi == 0) {
# LEXICAL SCOPING BUG, MAN!
@ -194,6 +219,9 @@ DATA
if($o->{vout}->[1]) {
$to2 = $o->{vout}->[1]->{scriptPubKey}->{addresses}->[0];
}
if($o->{vout}->[0]) {
$to3 = $o->{vout}->[0]->{scriptPubKey}->{addresses}->[0];
}
$valueBalance = ($o->{vout}->[0]->{value} || 0) + ($o->{vout}->[1]->{value} || 0);
$valueBalance ||= "?";
$from ||= "";
@ -202,6 +230,8 @@ DATA
if($zins+$zouts>0) {
$txtype = "Shielded";
if($zins==0 && $zouts>0) { $txtype = "Shielding"; }
if($vins==0 && $vouts==1 && $zins==1 && $zouts==8){ $txtype = "Notary" }
if($vins==1 && $vouts==14 && $zins==0 && $zouts==0){ $txtype = "dPoW" }
if($vins==0 && $vouts==0){ $txtype = "Fully Shielded" }
# this is prevented by consensus rule on HUSH mainnet
# but if we see it, ring the bell, lulz
@ -209,48 +239,110 @@ DATA
}
#if($vouts>0) { $txtype = "DPoW"; }
my $stuff;
my $txOutline = "rgba(255, 0, 0, 0.5)";
my $txBG = "rgba(255, 0, 0, 0.1)";
if ($txtype eq "Mining") {
$txOutline = "rgba(255, 0, 0, 0.5)";
$txBG = "rgba(255, 0, 0, 0.1)";
$stuff =<<STUFF;
<pre>
=> $to
=> $to2
</pre>
<br/>
=> $to (miner)
<br>
=> $to2 (FR address)
STUFF
} else {
#TODO: fix this shite
$stuff =<<STUFF;
<pre>
$from => $to
$from => $to2
</pre>
<br/>
} elsif ($txtype eq "Shielding") {
$txOutline = "rgba(255, 204, 0, 0.6)";
$txBG = "rgba(255, 204, 0, 0.1)";
$stuff =<<STUFF;
$from ($valueBalanceThird $ticker) => zs1??? (shielding)
STUFF
}
} elsif ($txtype eq "Notary") {
$txOutline = "rgba(255, 204, 0, 0.6)";
$txBG = "rgba(255, 204, 0, 0.1)";
$stuff =<<STUFF;
zs1??? => $to3 (notary)
<br>
zs1??? => zs1??? (shielded change)
STUFF
} elsif ($txtype eq "dPoW") {
$txOutline = "rgba(255, 204, 0, 0.6)";
$txBG = "rgba(255, 204, 0, 0.1)";
$stuff =<<STUFF;
=> $to2 (FR address)
<br>
=> $to2 (notary)
STUFF
} else {
$txBG = "rgba(0, 255, 8, 0.1)";
$txOutline = "rgba(0, 255, 8, 0.6)";
$stuff =<<STUFF;
$from => zs1??? (fully shielded)
STUFF
}
my $tx_table = <<HTML;
<tr>
<td><a href="/tx/$tx">$tx</a></td>
<td>$txtype</td>
<td align=center>$vins</td>
<td align=center>$vouts</td>
<td align=center>$zins</td>
<td align=center>$zouts</td>
<td>$stuff</td>
<td>$valueBalance HUSH</td>
<td>$txtime</td>
<!--
<td>$expiryheight</td>
<td>$locktime</td>
-->
</tr>
<div class="transaction flex-center flex-col">
<h3 class="tx-title">Transaction</h3>
<div
class="shielded"
style="--shielded-bg: ${txBG}; --shielded-col: ${txOutline};"
>
<span>$txtype</span>
</div>
<div class="tx-reward">${valueBalance} DRGX</div>
<span class="tx-time">$txtime</span>
<div class="tx-info" style="--tx-outline: ${txOutline};">
<div class="flex-center flex-col">
<div class="tx-id-bar">
<p>TX ID</p>
<a href="/tx/$tx"
>$tx</a
>
</div>
<div class="tx-id-bar" style="--miner-id-margin: 17.5vh">
<p>Miner</p>
<p class="">$to</p>
</div>
</div>
<div class="flex-center">
<div class="tx-in-out flex-center">
<div class="flex-center">
<p>Vins</p>
<p>$vins</p>
</div>
<div class="flex-center">
<p>Vouts</p>
<p>$vouts</p>
</div>
</div>
<div class="tx-in-out flex-center">
<div class="flex-center">
<p>Zins</p>
<p>$zins</p>
</div>
<div class="flex-center">
<p>Zouts</p>
<p>$zouts</p>
</div>
</div>
</div>
</div>
</div>
HTML
$STATS->{TX_TABLE} .= $tx_table;
$txi++;
}
$STATS->{TX_TABLE} .= "</table>";
# $STATS->{TX_TABLE} .= "</table>";
# $STATS->{TX_TABLE} .= "<pre>" . Dumper [ $vin ];''
$block_template =~ s/#TX_TABLE#/$STATS->{TX_TABLE}/ge;
@ -278,11 +370,12 @@ HTML
my $b = [ $h, $hash, $reward,$time,$numtx,$thisminer, $blockduration ];
#warn Dumper $b;
push @blocks, $b;
;
}
sub get_raw {
my $tx = shift;
my $cmd = "$cli getrawtransaction $tx 1";
my $cmd = "$cli -ac_name=$acname getrawtransaction $tx 1";
warn $cmd;
my $json = qx!$cmd!;
# "vout": 0,
@ -294,7 +387,12 @@ sub get_raw {
$json =~ s/"address":\w+"([a-z0-9]+)"(.+)"address":\w+"\g1"(.+)/"address": "$1"$2/mg;
warn "decoding tx=$tx"; # with json=$json";
my $j = JSON::Any->new;
my $o = $j->decode($json);
my $o ="";
eval {
$o = $j->decode($json);
};
return $o;
}
@ -308,15 +406,24 @@ for my $b (reverse @blocks) {
$duration = "--" unless $duration;
$STATS->{BLOCKS_TABLE} .= <<"FUCK";
<tr>
<td align=center><a href="/block/$height">$height</a></td>
<td align=center><a href="/block/$hash">$hash</a></td>
<td align=center>$time UTC</td>
<td align=center>$duration s</td>
<td align=center>$miner</td>
<td align=center>$reward</td>
<td align=center>$txs</td>
</tr>
<div class="block-card flex-center flex-col">
<div class="flex-center">
<a class="block-height flex-center" href="/block/$height/">$height</a>
<div>
<a class="block-hash flex-center" href="/block/$hash/">$hash</a>
<p class="address-reward flex-center" href="/block/$height/">$miner + $reward</p>
</div>
</div>
<div class="flex-center">
<div class="flex-center">
<p class="block-time flex-center">${duration}s</p>
</div>
<div class="flex-center">
<p class="block-date flex-center">$time</p>
<p class="tx-count flex-center">Transactions: $txs</p>
</div>
</div>
</div>
FUCK
}
@ -334,26 +441,24 @@ say $template;
###### functions
# get block at given height
sub get_block {
my $height = shift;
my $dir = "/home/duke/data/blocks/";
my $file = "$dir/block-$height.json";
my $stats = {};
my $block;
return if $height < 0;
my $block = $r->get("block:$height") || '';
# create data if it's not there
if( (!-e $file) || (-s $file == 0)) {
# logging?
my $cmd = "$cli getblock $height > /home/duke/data/blocks/block-$height.json";
if( $block =~ m/^HASH/ || length($block) == 0 ) {
my $cmd = "$cli -ac_name=$acname getblock $height";
warn $cmd;
qx/$cmd/;
# let the file sync to disk
sleep 1;
$block = qx/$cmd/;
}
my $json = readfile($file);
my $json = $block;
if($json) {
my $j = JSON::Any->new;
$block = $j->decode($json);
# cache in Redis
warn Dumper [ "redis set block:$height =>", $json ];
$r->set("block:$height",$json);
} else {
warn "empty block $height!!" unless $json;
warn Dumper [$json];

160
explorer.dragonx.is/block/template.html

@ -0,0 +1,160 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1"" />
<!-- <link rel="stylesheet" href="../dragonx.is/style.css" /> -->
<link rel="stylesheet" href="../../../dragonx.is/style.css" />
<link rel="icon" type="image/x-icon" href="../../../img/logo_dragonx.ico" />
<title>Explorer | DragonX</title>
</head>
<body>
<div class="bg-overlay"></div>
<div class="img-bg"></div>
<section class="explorer-block-section">
<div class="explorer-block-bar block">
<a class="back-btn" href="https://explorer.dragonx.is/blocks">Block List</a>
<a class="explorer-btn" href="https://explorer.dragonx.is">Explorer</a>
<h3 class="block-title">Block Info</h3>
<section class="block-info-card">
<div class="flex-center main-info">
<div class="block-info height">
<p>Block</p>
<a href="">#BLOCKS#</a>
</div>
<div>
<div class="flex-center">
<div class="block-info main">
<p>Reward</p>
<p>#BLOCKREWARD#</p>
</div>
<div class="block-info main">
<p>Difficulty</p>
<p>#DIFFICULTY#</p>
</div>
<div class="block-info main">
<p>Block Size</p>
<p>#BLOCKSIZE#</p>
</div>
</div>
<div class="flex-center">
<div class="block-info main">
<p>Block Time</p>
<p>#BLOCKTIME#</p>
</div>
<div class="block-info main">
<p>Block Version</p>
<p>#VERSION#</p>
</div>
<div class="block-info main">
<p>Block Bits</p>
<p>#BITS#</p>
</div>
</div>
</div>
</div>
<div class="flex-center flex-col hash-info">
<div class="block-info">
<p>Block Hash</p>
<a href="/block/#BLOCKHASH#"
>#BLOCKHASH#</a
>
</div>
<div class="block-info">
<p>Prev Hash</p>
<a href="/block/#PREVIOUSBLOCKHASH#"
>#PREVIOUSBLOCKHASH#</a
>
</div>
</div>
<div class="flex-center flex-col adv-info">
<div class="block-info">
<p>Block Nonce</p>
<p>
#BLOCKNONCE#
</p>
</div>
<div class="block-info">
<p>Block Anchor</p>
<p>
#ANCHOR#
</p>
</div>
<div class="block-info">
<p>Chainwork</p>
<p>
#CHAINWORK#
</p>
</div>
<div class="block-info">
<p>Merkle Root</p>
<p>
#MERKLEROOT#
</p>
</div>
<div class="block-info">
<p>Final Sapling Root</p>
<p>
#FINALSAPLINGROOT#
</p>
</div>
</div>
<div>#TX_TABLE#</div>
<!-- <div class="transaction flex-center flex-col">
<h3 class="tx-title">Transaction</h3>
<div
class="shielded"
style="--shielded-bg: ${txBG}; --shielded-col: ${txOutline};"
>
<span>$txtype</span>
</div>
<div class="tx-reward">${valueBalance} DRGX</div>
<span class="tx-time">$txtime</span>
<div class="tx-info" style="--tx-outline: ${txOutline};">
<div class="flex-center flex-col">
<div class="tx-id-bar">
<p>TX ID</p>
<a href="/tx/$tx"
>$tx</a
>
</div>
<div class="tx-id-bar" style="--miner-id-margin: 17.5vh">
<p>Miner</p>
<p class="">$to</p>
</div>
</div>
<div class="flex-center">
<div class="tx-in-out flex-center">
<div class="flex-center">
<p>Vins</p>
<p>$vins</p>
</div>
<div class="flex-center">
<p>Vouts</p>
<p>$vouts</p>
</div>
</div>
<div class="tx-in-out flex-center">
<div class="flex-center">
<p>Zins</p>
<p>$zins</p>
</div>
<div class="flex-center">
<p>Zouts</p>
<p>$zouts</p>
</div>
</div>
</div>
</div>
</div> -->
</section>
</div>
</section>
</body>
</html>

49
explorer.dragonx.is/blocks/template.html

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1"" />
<!-- <link rel="stylesheet" href="../dragonx.is/style.css" /> -->
<link rel="stylesheet" href="../../../dragonx.is/style.css" />
<link rel="icon" type="image/x-icon" href="../../../img/logo_dragonx.ico" />
<title>Explorer | DragonX</title>
</head>
<body>
<div class="bg-overlay"></div>
<div class="img-bg"></div>
<section id="blocks">
<div class="explorer-blocks-bar flex-center flex-col">
<a class="back-btn" href="https://explorer.dragonx.is">Back</a>
#BLOCKS_TABLE#
<!-- <div class="block-card flex-center flex-col">
<div class="flex-center">
<a class="block-height flex-center" href="/block/$height/">$height</a>
<div>
<a class="block-hash flex-center" href="/block/$hash/">$hash</a>
<p class="address-reward flex-center" href="/block/$height/">$miner + $reward</p>
</div>
</div>
<div class="flex-center">
<div class="flex-center">
<p class="block-time flex-center">${duration}s</p>
</div>
<div class="flex-center">
<p class="block-date flex-center">$time</p>
<p class="tx-count flex-center">Transactions: $txs</p>
</div>
</div>
</div> -->
</div>
</section>
</body>
</html>

6
var/www/explorer.hush.land/crons/README → explorer.dragonx.is/crons/README

@ -3,6 +3,10 @@
```
# m h dom mon dow command
SIONA_DOMAIN=explorer.dragonx.is
SIONA_CLI=/git/hush3/src/hush-cli
SIONA_ACNAME=DRAGONWX
*/7 * * * * ./update_explorer_data.sh
*/5 * * * * ./update_api.sh
#*/7 * * * * ./hush_cron.sh
@ -12,7 +16,7 @@
# start it if it's not running
20 */4 * * * ./restart-hushd.sh
*/10 * * * * /var/www/explorer.hush.land/update.sh
*/10 * * * * /var/www/explorer.dragonx.is/update.sh
```

6
explorer.dragonx.is/export_env.sh

@ -0,0 +1,6 @@
#!/usr/bin/env bash
export SIONA_ROOT_DIR="siona-DragonX"
export SIONA_DOMAIN="explorer.dragonx.is"
export SIONA_CLI="/home/admin/HUSH/hush3/src/dragonx-cli"
export SIONA_ACNAME="DRAGONX"

162
explorer.dragonx.is/index-1.html

@ -0,0 +1,162 @@
<!-- td = standard data cell -->
<!-- tr = row in html table, contians th or td elements -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../dragonx.is/style.css" />
<link rel="icon" type="image/x-icon" href="./logo_dragonx.png">
<title>Explorer | DragonX</title>
</head>
<body>
<header>
<input type="checkbox" id="nav-check" />
<nav class="nav-bar mobile">
<div class="toggle-overlay" style="pointer-events: none"></div>
<a href="https://dragonx.is">
<svg class="header-logo mobile" xmlns="http://www.w3.org/2000/svg" width="12vh"
height="12vh" viewBox="0 0 128 128" alt="dragonx logo">
<path fill="white" stroke="none" stroke-width="1"
d="M35.86 47.8c-2.76 3.53-5.73 6.97-8.88 10.45-4.11-3.47-8.71-4.13-8.71-4.13 17.78-6.06 2.18-11.77.22-12.65C.14 33.19 0 11.47 0 11.47c8.93 26.49 28.25 25.06 28.25 25.06.28-.17.52-.36.72-.55 1.27 2.54 3.56 6.73 6.89 11.83Zm10.31-16.46c-1.05 2.32-2.26 4.52-3.58 6.7a70.682 70.682 0 0 1-3.58-6.7c1.35-2.67 3.58-15.96 3.58-15.96s2.23 13.29 3.58 15.96Zm5.73 44.63-2.7 1.82s-.08-3.45-2.73-1.43c-.33.25-1.85 1.71-.03 3.31 0 0-3.14 3.17-3.86 6.37-.72-3.2-3.86-6.37-3.86-6.37 1.82-1.6.3-3.06-.03-3.31-2.65-2.01-2.73 1.43-2.73 1.43l-2.7-1.82c.22-2.76.08-5.18-.36-7.3 3.64-3.83 6.86-7.66 9.68-11.33 2.84 3.67 6.04 7.5 9.68 11.33-.44 2.12-.58 4.55-.36 7.3Zm15-21.86s-4.6.66-8.71 4.13c-3.11-3.47-6.12-6.92-8.88-10.45 3.34-5.1 5.62-9.29 6.89-11.83.19.19.44.39.72.55 0 0 19.32 1.43 28.25-25.06 0 0-.14 21.72-18.5 29.99-1.96.88-17.56 6.59.22 12.65Z" />
<path fill="#91a4b8" stroke="none" stroke-width="1"
d="M73.6 99.29s-4.88-19.16-14.53-26.71c-6.62-6.23-12.13-12.79-16.48-18.74-4.36 5.95-9.87 12.54-16.48 18.74-9.62 7.55-14.53 26.71-14.53 26.71-1.85-18.88 6.09-27.79 9.98-32.03 6.06-6.59 11.88-12.85 16.87-19.41-5.93-8.88-8.85-15.3-8.85-15.3-.69-2.54-2.98-5.15-2.98-5.15 4.71-6.28-1.24-13.18-1.24-13.18C29.85 9.86 30.57 6.45 31.81 0c-1.52 17.34 3.11 30.32 10.81 41.98C50.26 30.32 54.89 17.34 53.37 0c1.24 6.48 1.96 9.87 6.45 14.22 0 0-5.95 6.89-1.24 13.18 0 0-2.29 2.62-2.98 5.15 0 0-2.92 6.42-8.82 15.3 4.99 6.56 10.83 12.85 16.87 19.41 3.86 4.24 11.8 13.15 9.95 32.03Z" />
</svg>
</a>
<nav class="nav-links mobile">
<!-- https://git.hush.is/dan_s/how-to-mine-dragonx/src/branch/master/README.md -->
<a href="https://git.hush.is/dan_s/how-to-mine-dragonx/src/branch/master/README.md"
class="component-button" style="--index: 0"><small class="">Mine DragonX</small></a>
<a href="https://git.hush.is/hush/SilentDragon/releases" class="component-button"
style="--index: 1"><small class="">GUI Wallet</small></a>
<a href="https://t.me/+ISXrAVgLnXkwZmU5" class="component-button" style="--index: 2"><small
class="">Tech Support</small></a>
<a href="https://explorer.dragonx.is" class="component-button" style="--index: 3"><small
class="">Explorer</small></a>
<a href="https://www.youtube.com/channel/UCmGOYuRrFbPGRw5vytVgUQw" class="component-button"
style="--index: 3"><small class="">Guides</small></a>
</nav>
<button class="mobile-menu mobile" style="background-color: rgba(0, 0, 0, 0); border-style: none">
<label for="nav-check">
<img class="nav-mobile-icon nav-btn" src="../img/mobile-sidebar-button.png"
alt="hamburger menu" />
</label>
</button>
</nav>
<nav class="nav-bar desktop">
<nav class="nav-links">
<!-- https://git.hush.is/dan_s/how-to-mine-dragonx/src/branch/master/README.md -->
<a href="https://git.hush.is/dan_s/how-to-mine-dragonx/src/branch/master/README.md"
class="component-button"><small class="">Mine DragonX</small></a>
<a href="https://git.hush.is/hush/SilentDragon/releases" class="component-button"><small
class="">GUI Wallet</small></a>
<a href="https://t.me/+ISXrAVgLnXkwZmU5" class="component-button"><small class="">Tech
Support</small></a>
<a href="https://explorer.dragonx.is" class="component-button" style="--index: 3"><small
class="">Explorer</small></a>
<a href="https://www.youtube.com/channel/UCmGOYuRrFbPGRw5vytVgUQw" class="component-button"
style="--index: 3"><small class="">Guides</small></a>
</nav>
</nav>
</header>
<div class="header-space"></div>
<div class="divider"></div>
<section class="explorer-section">
<input class="explorer-radio" type="radio" name="radio" id="hush-tab" />
<input class="explorer-radio" type="radio" checked="checked" name="radio" id="dragonx-tab" />
<div class="explorer-content-body">
<section class="explorer-content">
<div class="hush-tab-info-bar">
<span>DragonX Was built on the&nbsp<a href="https://hush.is">HUSH</a>
Blockchain.</span>
</div>
<img class="logo-hush" src="../img/logo_HUSH.svg" alt="" />
</section>
<section class="explorer-content">
<div class="explorer-content-bar">
<span>This Explorer was forked from the&nbsp<a href="htpps://explorer.hush.land">
HUSH Explorer</a>.</span>
</div>
<div class="explorer-content-bar">
<h3>Last Update:</h3>
<span>#TIPTIME#</span>
</div>
<div class="explorer-content-bar">
<h3>Block Height :</h3>
<span>#BLOCKS#</span>
</div>
<div class="explorer-content-bar">
<h3>Hashrate:</h3>
<span>#HASHPS#</span>
</div>
<div class="explorer-content-bar">
<h3>Anonymity Set:</h3>
<span>#ANONSET#</span>
</div>
<div class="explorer-content-bar">
<h3>Total Transactions:</h3>
<span>#TXCOUNT#</span>
</div>
<div class="explorer-content-bar">
<h3>Price:</h3>
<span class="price">-</span>
</div>
<div class="explorer-content-bar">
<h3>Transaction Rate:</h3>
<span>#TXRATE#</span>
</div>
<div class="explorer-content-bar">
<h3>Difficulty:</h3>
<span>#DIFFICULTY#</span>
</div>
<div class="explorer-content-bar">
<h3>Total Volume:</h3>
<span class="volume">-</span>
</div>
<div class="explorer-content-bar">
<h3>Protocol Version:</h3>
<span>#PROTOCOLVERSION#</span>
</div>
<div class="explorer-content-bar">
<h3>Peers Connected:</h3>
<span>#CONNECTIONS# via TLS 1.3</span>
</div>
<div class="explorer-content-bar" style="--explorer-content-index: 2">
<h3>Circulating Supply:</h3>
<span>#SUPPLY#</span>
</div>
<div class="explorer-content-bar" style="--explorer-content-index: 1">
<h3>Shielded Supply:</h3>
<span>#ZFUNDS#</span>
</div>
<div class="explorer-content-bar" style="--explorer-content-index: 1">
<h3>Percent Shielded:</h3>
<span>#ZFUNDS_PERCENT#</span>
</div>
<nav class="explorer-nav">
<a class="explorer-info-btn" href="https://git.hush.is/hush/anonsets">What is
Anonset?</a>
<a class="explorer-info-btn" href="/blocks/">Blocklist</a>
<a class="explorer-info-btn" href="/addresses/">T-Address List</a>
</nav>
</section>
</div>
<div class="explorer-tab-bar">
<label for="hush-tab" class="explorer-tab" style="--tab-index: 2">
<span>HUSH</span>
</label>
<label for="dragonx-tab" class="explorer-tab" style="--tab-index: 0">
<span>DragonX Explorer</span>
</label>
<div class="explorer-dot" style="--tab-index: 1"></div>
<div class="explorer-dot" style="--tab-index: 0.94"></div>
<div class="explorer-dot" style="--tab-index: 0.88"></div>
</div>
</section>
<div class="divider"></div>
</body>
</html>

0
var/www/explorer.hush.land/var/www/explorer.hush.land/index-new.html → explorer.dragonx.is/index-new.html

0
var/www/explorer.hush.land/var/www/explorer.hush.land/index-prev.html → explorer.dragonx.is/index-prev.html

175
explorer.dragonx.is/index.html

@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1"" />
<!-- <link rel="stylesheet" href="../../dragonx.is/dragonx.is/style.css" /> -->
<link rel="stylesheet" href="../../dragonx.is/style.css" />
<link rel="icon" type="image/x-icon" href="./logo_dragonx.png" />
<title>Explorer | DragonX</title>
</head>
<body>
<header>
<div class="nav-logo">
<a href="https://dragonx.is" alt="dragonx logo"></a>
</div>
<div class="nav-menu desktop">
<a class="btn" href="https://dragonx.is/releases">Wallets</a>
<a class="btn" href="https://dragonx.is/exchanges">Exchanges</a>
<a class="btn" href="https://explorer.dragonx.is">Explorer</a>
<a class="btn" href="https://dragonx.is/guides">Guides</a>
<a class="btn" href="https://dragonx.is/tg">Telegram</a>
<a class="btn" href="https://dragonx.is/matrix">Matrix</a>
</div>
</header>
<input type="checkbox" id="mobile-checkbox" name="mobile-checkbox" style="display: none;">
<label for="mobile-checkbox" id="mobile-menu-btn"></label>
<div class="nav-menu mobile">
<a class="btn" href="https://dragonx.is/releases">Wallets</a>
<a class="btn" href="https://dragonx.is/exchanges">Exchanges</a>
<a class="btn" href="https://explorer.dragonx.is">Explorer</a>
<a class="btn" href="https://dragonx.is/guides">Guides</a>
<a class="btn" href="https://dragonx.is/tg">Telegram</a>
<a class="btn" href="https://dragonx.is/matrix">Matrix</a>
</div>
<div class="bg-overlay"></div>
<div class="img-bg"></div>
<section id="explorer" class="flex-col">
<div class="explorer-content flex-center">
<div class="explorer-title flex-center">
<h3>DragonX Explorer</h3>
<div class="flex-center">
<p>Price</p>
<p>$ #PRICE#</p>
</div>
</div>
<div class="explorer-inner-content">
<div class="explorer-1 flex-center">
<div>
<div class="flex-center">
<p>Hashrate</p>
<p>#HASHPS#</p>
</div>
<div class="flex-center">
<p>Difficulty</p>
<p>#DIFFICULTY#</p>
</div>
</div>
<div class="flex-center" id="graphContainer"></div>
</div>
<div class="explorer-2 flex-center">
<div>
<p>Block Height:</p>
<p>#BLOCKS#</p>
</div>
<div>
<p>Anonymity Set:</p>
<p>#ANONSET#</p>
</div>
<div>
<p>Total Transactions:</p>
<p>#TXCOUNT#</p>
</div>
<div>
<p>Transaction Rate:</p>
<p>#TXRATE#</p>
</div>
<div>
<p>Total Volume:</p>
<p>.0077033708 BTC</p>
</div>
</div>
<div class="explorer-3 flex-center">
<div>
<p>Circulating Supply:</p>
<p>#SUPPLY#</p>
</div>
<div>
<p>Shielded Supply:</p>
<p>#ZFUNDS#</p>
</div>
<div>
<p>Percent Shielded:</p>
<p>#ZFUNDS_PERCENT#</p>
</div>
</div>
<div class="explorer-4 flex-center">
<a href="https://explorer.dragonx.is/blocks" class="btn">Blocks</a>
</div>
</div>
</div>
<div class="explorer-footer flex-center">
<div class="flex-center">
<p>Protocol Version:</p>
<p>#PROTOCOLVERSION#</p>
</div>
<div class="flex-center">
<p>Last Update:</p>
<p>#TIPTIME#</p>
</div>
<div class="flex-center">
<p>Peers Connected:</p>
<p>#CONNECTIONS# via TLS 1.3</p>
</div>
</div>
</section>
<div class="divider"></div>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="./main.js"></script>
<footer class="flex-center">
<div class="flex-center">
<div class="footer-links flex-center">
<a href="https://dragonx.is/releases">Wallets</a>
<a href="https://dragonx.is/exchanges">Exchanges</a>
<a href="https://explorer.dragonx.is">Explorer</a>
</div>
<img
src="../../dragonx.is/img/logos/dragonx_logotext_light.svg"
class="footer-logo"
alt=""
/>
<div class="footer-links flex-center">
<a href="https://dragonx.is/mining/">How To Mine</a>
<a href="" class="link-out">Documentation</a>
<a href="https://arrakis.hush.is/">Hush Arrakis Chain Creator</a>
</div>
</div>
<div style="margin: 2rem 0 2rem 0" class="flex-center">
<a href="https://twitter.com/DragonXchain" class="footer-social"
><img
src="../../dragonx.is/img/social_icons/icon_twitter.svg"
onmouseover="src='../../dragonx.is/img/social_icons/icon_twitter_red.svg'"
onmouseleave="src='../../dragonx.is/img/social_icons/icon_twitter.svg'"
alt=""
/></a>
<a href="https://dragonx.is/tg" class="footer-social"
><img
src="../../dragonx.is/img/social_icons/icon_telegram.svg"
onmouseover="src='../../dragonx.is/img/social_icons/icon_telegram_red.svg'"
onmouseleave="src='../../dragonx.is/img/social_icons/icon_telegram.svg'"
alt=""
/></a>
<a href="https://dragonx.is/matrix" class="footer-social"
><img
src="../../dragonx.is/img/social_icons/icon_matrix.svg"
onmouseover="src='../../dragonx.is/img/social_icons/icon_matrix_red.svg'"
onmouseleave="src='../../dragonx.is/img/social_icons/icon_matrix.svg'"
alt=""
/></a>
</div>
© Copyright DragonX
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
</footer>
</body>
</html>

BIN
explorer.dragonx.is/logo_dragonx.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
explorer.dragonx.is/logo_dragonx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

90
explorer.dragonx.is/main.js

@ -0,0 +1,90 @@
// set the dimensions and margins of the graph
var margin = {top: 100, right: -10, bottom: 0, left: -10},
width = 538 - margin.left - margin.right,
height = 350 - margin.top - margin.bottom;
// parse the date / time
var parseTime = d3.timeParse("%Y");
// set the ranges
var x = d3.scaleTime().range([0, width]);
var y = d3.scaleLinear().range([height, 0]);
// define the line
var valueline = d3.line()
.x(function(d) { return x(d.Time); })
.y(function(d) { return y(d.Diff); });
// define the line
var valueline2 = d3.line()
.x(function(d) { return x(d.Time); })
.y(function(d) { return y(d.Hashrate); });
// append the svg obgect to the body of the page
// appends a 'group' element to 'svg'
// moves the 'group' element to the top left margin
var svg = d3.select("#graphContainer").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.attr("class", "graph")
.append("g")
.attr("transform",
"translate(" + margin.left + "," + margin.top + ")");
function draw(data, blocks) {
var data = data[blocks];
let graphHeight = 0;
// format the data
data.forEach(function(d) {
// d.Time = parseTime(d.Time);
console.log(d.Time);
d.Diff = +d.Diff;
d.Hashrate = +d.Hashrate;
graphHeight = d.Diff;
});
// sort years ascending
data.sort(function(a, b){
return a["Block"]-b["Block"];
})
// Scale the range of the data
x.domain(d3.extent(data, function(d) { return d.Time; }));
y.domain([0, d3.max(data, function(d) {
return Math.max(d.Diff, d.Hashrate); })]);
// Add the valueline path.
svg.append("path")
.data([data])
.attr("class", "line1")
.attr("d", valueline);
// Add the valueline path.
svg.append("path")
.data([data])
.attr("class", "line2")
.attr("d", valueline2);
// Add the X Axis
svg.append("g")
.attr("transform", "translate(0," + (height - 20) + ")")
.call(d3.axisBottom(x));
// // Add the Y Axis
// svg.append("g")
// .call(d3.axisLeft(y));
}
// Get the data
d3.json("./api/hashrate100.json", function(error, data) {
if (error) throw error;
data.blocks.splice(0, data.blocks.length - 5 );
// console.log(data);
// trigger render
draw(data, "blocks");
});

175
explorer.dragonx.is/template.html

@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1"" />
<!-- <link rel="stylesheet" href="../../dragonx.is/dragonx.is/style.css" /> -->
<link rel="stylesheet" href="../../dragonx.is/style.css" />
<link rel="icon" type="image/x-icon" href="./logo_dragonx.png" />
<title>Explorer | DragonX</title>
</head>
<body>
<header>
<div class="nav-logo">
<a href="https://dragonx.is" alt="dragonx logo"></a>
</div>
<div class="nav-menu desktop">
<a class="btn" href="https://dragonx.is/releases">Wallets</a>
<a class="btn" href="https://dragonx.is/exchanges">Exchanges</a>
<a class="btn" href="https://explorer.dragonx.is">Explorer</a>
<a class="btn" href="https://dragonx.is/guides">Guides</a>
<a class="btn" href="https://dragonx.is/tg">Telegram</a>
<a class="btn" href="https://dragonx.is/matrix">Matrix</a>
</div>
</header>
<input type="checkbox" id="mobile-checkbox" name="mobile-checkbox" style="display: none;">
<label for="mobile-checkbox" id="mobile-menu-btn"></label>
<div class="nav-menu mobile">
<a class="btn" href="https://dragonx.is/releases">Wallets</a>
<a class="btn" href="https://dragonx.is/exchanges">Exchanges</a>
<a class="btn" href="https://explorer.dragonx.is">Explorer</a>
<a class="btn" href="https://dragonx.is/guides">Guides</a>
<a class="btn" href="https://dragonx.is/tg">Telegram</a>
<a class="btn" href="https://dragonx.is/matrix">Matrix</a>
</div>
<div class="bg-overlay"></div>
<div class="img-bg"></div>
<section id="explorer" class="flex-col">
<div class="explorer-content flex-center">
<div class="explorer-title flex-center">
<h3>DragonX Explorer</h3>
<div class="flex-center">
<p>Price</p>
<p>$ #PRICE#</p>
</div>
</div>
<div class="explorer-inner-content">
<div class="explorer-1 flex-center">
<div>
<div class="flex-center">
<p>Hashrate</p>
<p>#HASHPS#</p>
</div>
<div class="flex-center">
<p>Difficulty</p>
<p>#DIFFICULTY#</p>
</div>
</div>
<div class="flex-center" id="graphContainer"></div>
</div>
<div class="explorer-2 flex-center">
<div>
<p>Block Height:</p>
<p>#BLOCKS#</p>
</div>
<div>
<p>Anonymity Set:</p>
<p>#ANONSET#</p>
</div>
<div>
<p>Total Transactions:</p>
<p>#TXCOUNT#</p>
</div>
<div>
<p>Transaction Rate:</p>
<p>#TXRATE#</p>
</div>
<div>
<p>Total Volume:</p>
<p>.0077033708 BTC</p>
</div>
</div>
<div class="explorer-3 flex-center">
<div>
<p>Circulating Supply:</p>
<p>#SUPPLY#</p>
</div>
<div>
<p>Shielded Supply:</p>
<p>#ZFUNDS#</p>
</div>
<div>
<p>Percent Shielded:</p>
<p>#ZFUNDS_PERCENT#</p>
</div>
</div>
<div class="explorer-4 flex-center">
<a href="https://explorer.dragonx.is/blocks" class="btn">Blocks</a>
</div>
</div>
</div>
<div class="explorer-footer flex-center">
<div class="flex-center">
<p>Protocol Version:</p>
<p>#PROTOCOLVERSION#</p>
</div>
<div class="flex-center">
<p>Last Update:</p>
<p>#TIPTIME#</p>
</div>
<div class="flex-center">
<p>Peers Connected:</p>
<p>#CONNECTIONS# via TLS 1.3</p>
</div>
</div>
</section>
<div class="divider"></div>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="./main.js"></script>
<footer class="flex-center">
<div class="flex-center">
<div class="footer-links flex-center">
<a href="">Wallets</a>
<a href="">Exchanges</a>
<a href="">Explorer</a>
</div>
<img
src="../../dragonx.is/img/logos/dragonx_logotext_light.svg"
class="footer-logo"
alt=""
/>
<div class="footer-links flex-center">
<a href="">How To Mine</a>
<a href="" class="link-out">Documentation</a>
<a href="">Arrakis Chain Creator</a>
</div>
</div>
<div style="margin: 2rem 0 2rem 0" class="flex-center">
<a href="https://twitter.com/DragonXchain" class="footer-social"
><img
src="../../dragonx.is/img/social_icons/icon_twitter.svg"
onmouseover="src='../../dragonx.is/img/social_icons/icon_twitter_red.svg'"
onmouseleave="src='../../dragonx.is/img/social_icons/icon_twitter.svg'"
alt=""
/></a>
<a href="https://dragonx.is/tg" class="footer-social"
><img
src="../../dragonx.is/img/social_icons/icon_telegram.svg"
onmouseover="src='../../dragonx.is/img/social_icons/icon_telegram_red.svg'"
onmouseleave="src='../../dragonx.is/img/social_icons/icon_telegram.svg'"
alt=""
/></a>
<a href="https://dragonx.is/matrix" class="footer-social"
><img
src="../../dragonx.is/img/social_icons/icon_matrix.svg"
onmouseover="src='../../dragonx.is/img/social_icons/icon_matrix_red.svg'"
onmouseleave="src='../../dragonx.is/img/social_icons/icon_matrix.svg'"
alt=""
/></a>
</div>
© Copyright DragonX
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
</footer>
</body>
</html>

65
explorer.dragonx.is/tx/template.html

@ -0,0 +1,65 @@
<!doctype html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1"" />
<!-- <link rel="stylesheet" href="../dragonx.is/style.css" /> -->
<link rel="stylesheet" href="../../../dragonx.is/style.css" />
<link rel="icon" type="image/x-icon" href="../../../img/logo_dragonx.ico" />
<title>Explorer | DragonX</title>
</head>
<body>
<div class="bg-overlay"></div>
<div class="img-bg"></div>
<section id="tx-info">
<div class="tx-info-bar flex-center flex-col">
<a class="back-btn" href="/block/#BLOCKHEIGHT#/"">Back</a>
<a class="back-btn" href="https://explorer.dragonx.is/blocks"">Block List</a>
<a class="explorer-btn" href="https://explorer.dragonx.is">Explorer</a>
<div class="tx-info-height">
<p>Block Height</p>
<a href="/block/#BLOCKHEIGHT#/" class="">#BLOCKHEIGHT#</a>
</div>
<div class="tx-info-main tx-id">
<p>TX ID</p>
<span class="tx-id-text">#TXID#</span>
</div>
<div class="tx-info-main">
<p>TX Time</p>
<span class="">#TXTIME#</span>
</div>
<div class="tx-info-hash">
<p>Block Hash</p>
<a href="/block/#BLOCKHASH#">#BLOCKHASH#</a>
</div>
#TX_DATA#
<!-- <div class="tx-transaction flex-center flex-col">
<div class="flex-center flex-col">
<div class="flex-center flex-col"><h3>Coinbase</h3><span>$coinbase</span></div>
<div class="flex-center flex-col"><h3>Locktime</h3><span>$locktime</span></div>
</div>
<div class="flex-center flex-col">
<div class="flex-center flex-col">
<div class="flex-center flex-col"><h3>Transparent Inputs:</h3><span>$vins</span></div>
<div class="flex-center flex-col"><h3>Transparent Outputs:</h3><span>$vouts</span></div>
</div>
<div class="flex-center flex-col">
<div class="flex-center flex-col"><h3>Shielded Inputs:</h3><span>$zins</span></div>
<div class="flex-center flex-col"><h3>Shielded Outputs:</h3><span>$zouts</span></div>
</div>
</div>
</div> -->
</div>
</section>
</body>
</html>

15
explorer.dragonx.is/update-old.sh

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
DOMAIN=${SIONA_DOMAIN}
DIR="/var/www/$DOMAIN"
echo $$ >> $DIR/PID
# make a backup so we can diff them
cp $DIR/{index,index-prev}.html
# let index.html settle
sleep 2
perl $DIR/bin/update.pl $DIR/api &> $DIR/index-new.html
cp $DIR/index-new.html $DIR/index.html

16
explorer.dragonx.is/update.sh

@ -0,0 +1,16 @@
#!/usr/bin/env bash
DOMAIN=${SIONA_DOMAIN}
ROOT_DIR=${SIONA_ROOT_DIR}
DIR="/var/www/$ROOT_DIR/$DOMAIN"
cd $DIR && ./update_api.sh
cd $DIR && ./update_explorer_data.sh
# Anonset
# cd $DIR && anonset=$(curl -s "https://$DOMAIN/api/getchaintxstats.json" | jq -r '.shielded_pool_size') && sed -i "s|<span class='anonset'>.*</span>|<span class='anonset'> $anonset </span>|g" template.html
perl $DIR/bin/update.pl > $DIR/index-1.html
cat $DIR/index-1.html > $DIR/index.html

33
explorer.dragonx.is/update_api.sh

@ -0,0 +1,33 @@
#!/usr/bin/env bash
# Copyright 2016-2022 The Hush Developers
SIONA_ROOT_DIR="siona-DragonX"
SIONA_DOMAIN="explorer.dragonx.is"
SIONA_CLI="/home/admin/HUSH/hush3/src/dragonx-cli"
SIONA_ACNAME="DRAGONX"
DOMAIN=${SIONA_DOMAIN}
ROOT_DIR=${SIONA_ROOT_DIR}
CLI=${SIONA_CLI}
# this is optional and not used yet here
ACNAME=${SIONA_ACNAME}
DIR=/var/www/$ROOT_DIR/$DOMAIN/api
HIGHESTBLOCK=$(curl -s "https://$DOMAIN/api/getblockchain.json" | jq -r '.blocks')
echo "highest block" $HIGHESTBLOCK
# TODO: remove IP info from getpeerinfo
#$CLI getpeerinfo > $DIR/getpeerinfo.json
$CLI getinfo &> $DIR/getinfo.json
$CLI getmininginfo &> $DIR/getmininginfo.json
$CLI getchaintxstats &> $DIR/getchaintxstats.json
$CLI gettxoutsetinfo &> $DIR/gettxoutsetinfo.json
$CLI coinsupply &> $DIR/coinsupply.json
$CLI getchaintips &> $DIR/getchaintips.json
$CLI getchaintxstats &> $DIR/getchaintxstats.json
redis-cli set anonset $($CLI z_anonsetblockdelta 1 $HIGHESTBLOCK)
redis-cli set hashps $($CLI getnetworkhashps -1)

19
explorer.dragonx.is/update_explorer_data.sh

@ -0,0 +1,19 @@
#!/usr/bin/env bash
cli=${SIONA_CLI}
DOMAIN=${SIONA_DOMAIN}
ROOT_DIR=${SIONA_ROOT_DIR}
# only ask for data if we don't have it
#if [ -s ~/data/blocks/block-$HEIGHT.json ]; then
# HEIGHT=$($cli getblockcount); $cli getblock $HEIGHT > ~/data/blocks/block-$HEIGHT.json
#fi
NEWFILE=/var/www/$ROOT_DIR/$DOMAIN/blocks/index.new.html
INDEXFILE=/var/www/$ROOT_DIR/$DOMAIN/blocks/index.html
# reads data from /var/www/$domain/api
/var/www/$ROOT_DIR/$DOMAIN/bin/update_blocks_redis.pl > $NEWFILE
if [ -s $NEWFILE ]; then
cp $NEWFILE $INDEXFILE
fi

79
explorer.dragonx.is/update_hashrate.sh

@ -0,0 +1,79 @@
#!/usr/bin/env bash
# Copyright 2016-2022 The Hush Developers
SIONA_ROOT_DIR="siona-DragonX"
SIONA_DOMAIN="explorer.dragonx.is"
SIONA_CLI="/home/admin/HUSH/hush3/src/dragonx-cli"
SIONA_ACNAME="DRAGONX"
DOMAIN=${SIONA_DOMAIN}
ROOT_DIR=${SIONA_ROOT_DIR}
CLI=${SIONA_CLI}
# this is optional and not used yet here
ACNAME=${SIONA_ACNAME}
DIR=/var/www/$ROOT_DIR/$DOMAIN/api
$CLI getblockchaininfo &> $DIR/getblockchain.json
HIGHESTBLOCK=$(curl -s "https://$DOMAIN/api/getblockchain.json" | jq -r '.blocks')
CURBLOCKCOMPARE=$(curl -s "https://$DOMAIN/api/blockinfo.json" | jq -r '.height')
#check if still on the same block so there's no duplicate data
if (( $HIGHESTBLOCK == $CURBLOCKCOMPARE)); then
echo "getblockchain.json blocks" $HIGHESTBLOCK
echo "blockinfo.json height" $CURBLOCKCOMPARE
echo "no new block, skipping..."
else
echo "getblockchain.json blocks" $HIGHESTBLOCK
echo "blockinfo.json height" $CURBLOCKCOMPARE
echo "new block, adding data.."
$CLI getnetworkhashps -1 &> $DIR/hashps.json
$CLI getblock $HIGHESTBLOCK 1 &> $DIR/blockinfo.json
CURBLOCKHEIGHT=$(curl -s "https://$DOMAIN/api/blockinfo.json" | jq -r '.height')
echo "CURBLOCKHEIGHT" $CURBLOCKHEIGHT
CURBLOCKDIFF=$(curl -s "https://$DOMAIN/api/blockinfo.json" | jq -r '.difficulty')
echo "CURBLOCKDIFF" $CURBLOCKDIFF
CURBLOCKTIME=$(curl -s "https://$DOMAIN/api/blockinfo.json" | jq -r '.time')
echo "CURBLOCKTIME" $CURBLOCKTIME
CURHASHPS=$(curl -s "https://$DOMAIN/api/hashps.json")
echo "CURHASHPS" $CURHASHPS
#recording every block for historical data purposes
jq --arg jq_block_height ${CURBLOCKHEIGHT} \
--arg jq_block_diff ${CURBLOCKDIFF} \
--arg jq_block_time ${CURBLOCKTIME} \
--arg jq_block_hashps ${CURHASHPS} \
'.blocks += [{
"Block": $jq_block_height,
"Time": $jq_block_time,
"Diff": $jq_block_diff,
"Hashrate": $jq_block_hashps
}]' /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate.json > /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate.json.tmp
mv /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate.json.tmp /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate.json
#only record every 100th block for rendering the graph so I don't have to loop through every entry to format for d3.js
if (($HIGHESTBLOCK % 100 == 0)); then
jq --arg jq_block_height ${CURBLOCKHEIGHT} \
--arg jq_block_diff ${CURBLOCKDIFF} \
--arg jq_block_time ${CURBLOCKTIME} \
--arg jq_block_hashps ${CURHASHPS} \
'.blocks += [{
"Block": $jq_block_height,
"Time": $jq_block_time,
"Diff": $jq_block_diff,
"Hashrate": $jq_block_hashps
}]' /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate.json > /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate100.json.tmp
mv /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate100.json.tmp /var/www/siona-DragonX/explorer.dragonx.is/api/hashrate100.json
else
echo "not 100th block"
fi
fi

10
explorer.dragonx.is/update_price.sh

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Copyright 2016-2022 The Hush Developers
PRICE=$(curl -s "https://api.coinpaprika.com/v1/coins/drgx-dragonx/ohlcv/latest" | jq -r '.[].open')
PRICEROUNDED=`printf "%.2f" $PRICE`
redis-cli set price $PRICEROUNDED

1
git/explorer.hush.land/yep

@ -1 +0,0 @@
yep

1
git/hush3/yep

@ -1 +0,0 @@
git clone https://git.hush.is/hush/hush3

14
update.sh

@ -1,14 +0,0 @@
#!/usr/bin/env bash
DIRDIR="/var/www/explorer.hush.land/var/www/explorer.hush.land"
DIR="/var/www/explorer.hush.land"
cd $DIR && ./update_explorer_data.sh
cd $DIR && ./update_api.sh
# Anonset
cd $DIRDIR && anonset=$(curl -s 'https://explorer.hush.land/api/getchaintxstats.json' | jq -r '.shielded_pool_size') && sed -i "s|<span class='anonset'>.*</span>|<span class='anonset'> $anonset </span>|g" template.html
perl $DIR/bin/update.pl > $DIRDIR/index-1.html
cd $DIRDIR && cat index-1.html > index.html

0
var/www/explorer.hush.land/PID

337
var/www/explorer.hush.land/bin/doesnotwork_update_addr.pl

@ -1,337 +0,0 @@
#!/usr/bin/env perl
use strict;
use warnings;
use JSON::Any;
use Data::Dumper;
use 5.014;
my $STATS = {};
$|=1;
my $ADDRS = {};
# While Siona swims, we pave with bricks on the road she will run on...
my $dir = shift || $ENV{HOME} . "/data";
my $cli = "/home/duke/git/hush3/src/hush-cli";
my $getinfo = readfile("$dir/getinfo.json");
my $template = readfile("/var/www/explorer.hush.is/address/template.html");
my $addrdir = "/var/www/explorer.hush.is/address/";
if($getinfo =~ m/"blocks": (\d+)/){ $STATS->{BLOCKS} ||= $1; }
if($getinfo =~ m/"tls_connections": (\d+)/){ $STATS->{TLS_CONNECTIONS} ||= $1; }
if($getinfo =~ m/"connections": (\d+)/){ $STATS->{CONNECTIONS} ||= $1; }
if($getinfo =~ m/"protocolversion": (\d+)/){ $STATS->{PROTOCOLVERSION} ||= $1; }
my @symbols = qw/
TX_TABLE ADDRESSES_TABLE TLS_CONNECTIONS CONNECTIONS PROTOCOLVERSION
/;
my @addresses;
my $height = $STATS->{BLOCKS};
$STATS->{ADDRESSES_TABLE} = "";
$STATS->{TX_TABLE} = "";
my $mineraddress = "";
for my $h ($height-50 .. $height) {
my $thisminer = "";
# TODO: fix this garbage
my $reward = $h > 340000 ? "3.125 HUSH" : "12.5 HUSH";
my $block = get_block($h);
#die Dumper $block;
my $time = localtime($block->{time}) . " UTC" || "";
my @txs = @{ $block->{tx} };
my $numtx = @txs;
# TODO: look on filesystem first? redis cache?
my $hash = qx!$cli getblockhash $h!;
chomp $hash;
my $root = "/var/www/explorer.hush.is";
my $blockdir = "$root/block/$hash";
if (!-e "$root/block/$h") {
# make /block/HEIGHT work
my $cmd = "ln -s $blockdir $root/block/$h";
qx{$cmd};
warn $cmd;
}
if (!-d $blockdir) {
# so explorer.hush.is/block/HASH works
my $cmd = "mkdir -p $blockdir";
qx{$cmd};
warn $cmd;
my $block_template_file = "$root/block/template.html";
my $new_block_file = "$root/block/$hash/index.html";
# TODO: process template with block details
my $block_template = readfile($block_template_file);
$block_template =~ s/#BLOCKS#/$h/g;
$block_template =~ s/#BLOCKHASH#/$hash/g;
$block_template =~ s/#PREVIOUSBLOCKHASH#/$block->{previousblockhash}/ge;
$block_template =~ s/#BLOCKTIME#/$time/g;
$block_template =~ s/#ANCHOR#/$block->{anchor}/ge;
$block_template =~ s/#VERSION#/$block->{version}/ge;
$block_template =~ s/#BITS#/$block->{bits}/ge;
$block_template =~ s/#BLOCKSIZE#/$block->{size}/ge;
$block_template =~ s/#CHAINWORK#/$block->{chainwork}/ge;
$block_template =~ s/#MERKLEROOT#/$block->{merkleroot}/ge;
$block_template =~ s/#FINALSAPLINGROOT#/$block->{finalsaplingroot}/ge;
# TODO
$block_template =~ s/#BLOCKREWARD#/3.125 HUSH/g;
$block_template =~ s/#BLOCKNONCE#/$block->{nonce}/ge;
$block_template =~ s/#DIFFICULTY#/$block->{difficulty}/ge;
$block_template =~ s/#NUM_TXS#/$numtx/g;
my $txtype = "";
# generate tx list table
$STATS->{TX_TABLE}=<<HTML;
<table border=1>
<tr><th>Transaction ID (txid)</th><th>Type</th><th>Inputs</th>
<th>Outputs</th><th>Shielded Inputs</th><th>Shielded Outputs</th>
<th>Addresses</th>
<th>Amount</th>
<th>Transaction Time</th>
<!--
<th>Expiry Height</th>
<th>Lock Time</th>
-->
</tr>
HTML
my $txi = 0;
for my $tx (@txs) {
my $json = qx!$cli getrawtransaction $tx 1!;
# "vout": 0,
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj",
# address is duplicated in the JSON of getrawtransaction !! fuck.
# KMD or ZEC upstream bug?
$json =~ s/"vout": 0,\w*"address": "([a-z0-9]+)",/"vout": 0,/mg;
# Satoshi Forgive Me
$json =~ s/"address":\w+"([a-z0-9]+)"(.+)"address":\w+"\g1"(.+)/"address": "$1"$2/mg;
warn "decoding tx=$tx"; # with json=$json";
my $j = JSON::Any->new;
my $o = $j->decode($json);
$TX->{$tx} = $o;
my $tx_dir = "$root/tx/$tx";
my $tx_file = "$root/tx/$tx/index.html";
my $tx_template_file = "$root/tx/template.html";
my $tx_template = readfile($tx_template_file);
my $txtime = localtime($o->{time}) . " UTC ( " . $o->{time} . " )";
#my $txsize = $o->{size} . " bytes";
$tx_template =~ s/#TXID#/$tx/ge;
$tx_template =~ s/#TXTIME#/$txtime/ge;
#$tx_template =~ s/#TXSIZE#/$txsize/g;
$tx_template =~ s/#BLOCKHEIGHT#/$h/ge;
$tx_template =~ s/#BLOCKHASH#/$hash/ge;
my ($vin,$vout,$zin,$zout) = ($o->{vin},$o->{vout},$o->{vShieldedSpend},$o->{vShieldedOutput});
my $expiryheight = $o->{expiryheight} == 0 ? "Default" : $o->{expiryheight};
my $locktime = localtime($o->{locktime}) . " UTC ( " . $o->{locktime} . " )";
my $valueBalance = $o->{valueBalance} || "?";
my $vins = @$vin;
my $vouts = @$vout;
my $zins = @$zin;
my $zouts = @$zout;
my $coinbase = $vin->[0] ? $vin->[0]->{coinbase}." with sequence ".$vin->[0]->{sequence} : "False"; #($vin->[0] && $vin->[0]->{coinbase}) ? $vin->[0]{coinbase} . " with sequence " . $vin->{sequence} : "False";
# coinbase does not count as a transparent input
$vins-- if ($vin->[0] && $vin->[0]->{coinbase});
my $tx_data =<<DATA;
<table border=1>
<tr><th>Coinbase</th><td align=center>$coinbase</td></tr>
<tr><th>Expiry Height</th><td align=center>$expiryheight</td></tr>
<tr><th>Transparent Inputs</th><td align=center> $vins </td></tr>
<tr><th>Transparent Outputs</th><td align=center> $vouts </td></tr>
<tr><th>Shielded Inputs</th><td align=center> $zins </td></tr>
<tr><th>Shielded Outputs</th><td align=center> $zouts </td></tr>
<tr><th>Locktime</th><td align=center>$locktime</td></tr>
</table>
DATA
$tx_template =~ s/#TX_DATA#/$tx_data/g;
my $cmd = "mkdir -p $tx_dir";
warn $cmd;
## create tx dir + page
qx{$cmd};
open(my $fh, '>', $tx_file) or die "$tx_file: $!";
print $fh $tx_template;
close $fh or die $!;
## create tx view on block page
my $from = $o->{vin}->[0] ? $o->{vin}->[0]->{address} : "zs1???";
#my $to = $o->{vout}->[0] ? $o->{vout}->[0]->{scriptPubKey}->{addresses}->[0] : "zs1???";
my $to2 = "";
# only look at coinbase tx's
if($txi == 0) {
# LEXICAL SCOPING BUG, MAN!
$mineraddress = $o->{vout}->[0] ? $o->{vout}->[0]->{scriptPubKey}->{addresses}->[0] : "";
$thisminer = $mineraddress;
}
say "<!-- miner for $tx is $mineraddress -->";
my $to = $mineraddress ? $mineraddress : "zs1???";
if($o->{vout}->[1]) {
$to2 = $o->{vout}->[1]->{scriptPubKey}->{addresses}->[0];
}
$valueBalance = ($o->{vout}->[0]->{value} || 0) + ($o->{vout}->[1]->{value} || 0);
$valueBalance ||= "?";
$from ||= "";
$txtype = "Mining";
if($zins+$zouts>0) {
$txtype = "Shielded";
if($zins==0 && $zouts>0) { $txtype = "Shielding"; }
if($vins==0 && $vouts==0){ $txtype = "Fully Shielded" }
# this is prevented by consensus rule on HUSH mainnet
# but if we see it, ring the bell, lulz
if($zins>0 && $zouts==0) { $txtype = "De-Shielding!"; }
}
#if($vouts>0) { $txtype = "DPoW"; }
my $stuff;
if ($txtype eq "Mining") {
$stuff =<<STUFF;
<pre>
=> $to
=> $to2
</pre>
<br/>
STUFF
} else {
#TODO: fix this shite
$stuff =<<STUFF;
<pre>
$from => $to
$from => $to2
</pre>
<br/>
STUFF
}
my $tx_table = <<HTML;
<tr>
<td><a href="/tx/$tx">$tx</a></td>
<td>$txtype</td>
<td align=center>$vins</td>
<td align=center>$vouts</td>
<td align=center>$zins</td>
<td align=center>$zouts</td>
<td>$stuff</td>
<td>$valueBalance HUSH</td>
<td>$txtime</td>
<!--
<td>$expiryheight</td>
<td>$locktime</td>
-->
</tr>
HTML
$STATS->{TX_TABLE} .= $tx_table;
$txi++;
}
$STATS->{TX_TABLE} .= "</table>";
# $STATS->{TX_TABLE} .= "<pre>" . Dumper [ $vin ];''
$block_template =~ s/#TX_TABLE#/$STATS->{TX_TABLE}/ge;
# > ?
open(my $fh, '>>', $new_block_file) or die "$new_block_file: $!";
print $fh $block_template;
close $fh or die $!;
warn "wrote to $new_block_file ";
} else {
warn "block exists on disk, looking info up";
#TODO: error-checking for corrupt data
#warn Dumper $block;
my $lookuptx = $block->{tx}->[0];
my $o = get_raw($lookuptx);
$thisminer = $o->{vout}->[0]->{scriptPubKey}->{addresses}->[0];
warn "thisminer=$thisminer";
}
# give data to blocks after we have processed everything
my $b = [ $h, $hash, $reward,$time,$numtx,$thisminer,0 ];
#warn Dumper $b;
push @addresses, $b;
}
sub get_raw {
my $tx = shift;
my $cmd = "$cli getrawtransaction $tx 1";
warn $cmd;
my $json = qx!$cmd!;
# "vout": 0,
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj",
# address is duplicated in the JSON of getrawtransaction !! fuck.
# KMD or ZEC upstream bug?
$json =~ s/"vout": 0,\w*"address": "([a-z0-9]+)",/"vout": 0,/mg;
# Satoshi Forgive Me
$json =~ s/"address":\w+"([a-z0-9]+)"(.+)"address":\w+"\g1"(.+)/"address": "$1"$2/mg;
warn "decoding tx=$tx"; # with json=$json";
my $j = JSON::Any->new;
my $o = $j->decode($json);
return $o;
}
# render data
for my $b (reverse @addresses) {
$STATS->{ADDRESSES_TABLE} .= <<"FUCK";
<tr>
<td align=center><a href="/block/$b->[0]">$b->[0]</a></td>
<td align=center><a href="/block/$b->[1]">$b->[1]</a></td>
<td align=center>$b->[2]</td>
<td align=center>$b->[3]</td>
<td align=center>$b->[4]</td>
<td align=center>$b->[5]</td>
</tr>
FUCK
}
for my $s (@symbols) {
if($s && $STATS->{$s}) { $template =~ s/#$s#/$STATS->{$s}/ge }
}
say $template;
###### functions
sub get_block {
my $height = shift;
my $dir = "/home/duke/data/blocks/";
my $file = "$dir/block-$height.json";
my $stats = {};
my $block;
# create data if it's not there
if( (!-e $file) || (-s $file == 0)) {
# logging?
my $cmd = "$cli getblock $height > /home/duke/data/blocks/block-$height.json";
warn $cmd;
qx/$cmd/;
# let the file sync to disk
sleep 1;
}
my $json = readfile($file);
if($json) {
my $j = JSON::Any->new;
$block = $j->decode($json);
} else {
warn "empty block $height!!" unless $json;
warn Dumper [$json];
}
return $block;
}
sub readfile {
my $file = shift;
my $data = "";
open(my $fh, '<', $file) or die "$file: $!";
my $txlist = 0;
while(<$fh>){
$data.=$_
}
close($fh);
return $data;
}

7
var/www/explorer.hush.land/bin/tmp.pl

@ -1,7 +0,0 @@
#!/usr/bin/perl
use strict;
use warnings;
use Redis;
my $r = Redis->new;
$r->set("test:123","fuck");

13
var/www/explorer.hush.land/update_api.sh

@ -1,13 +0,0 @@
#!/usr/bin/env bash
DIR=/var/www/explorer.hush.land/var/www/explorer.hush.land/api
# TODO: remove IP info from getpeerinfo
#~/git/hush3/src/hush-cli getpeerinfo > $DIR/getpeerinfo.json
~/git/hush3/src/hush-cli getinfo &> $DIR/getinfo.json
~/git/hush3/src/hush-cli getmininginfo &> $DIR/getmininginfo.json
~/git/hush3/src/hush-cli getblockchaininfo &> $DIR/getblockchain.json
~/git/hush3/src/hush-cli getchaintxstats &> $DIR/getchaintxstats.json
~/git/hush3/src/hush-cli gettxoutsetinfo &> $DIR/gettxoutsetinfo.json
~/git/hush3/src/hush-cli coinsupply &> $DIR/coinsupply.json
~/git/hush3/src/hush-cli getchaintips &> $DIR/getchaintips.json
~/git/hush3/src/hush-cli getchaintxstats &> $DIR/getchaintxstats.json

18
var/www/explorer.hush.land/update_explorer_data.sh

@ -1,18 +0,0 @@
#!/usr/bin/env bash
cli=~/git/hush3/src/hush-cli
# only ask for data if we don't have it
#if [ -s ~/data/blocks/block-$HEIGHT.json ]; then
# HEIGHT=$($cli getblockcount); $cli getblock $HEIGHT > ~/data/blocks/block-$HEIGHT.json
#fi
NEWFILE=/var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/index.new.html
INDEXFILE=/var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/index.html
# reads data from /var/www/explorer.hush.is/api
#~/git/explorer.hush.is/bin/update_blocks.pl > $NEWFILE
/var/www/explorer.hush.land/bin/update_blocks_redis.pl > $NEWFILE
if [ -s $NEWFILE ]; then
cp $NEWFILE $INDEXFILE
fi

78
var/www/explorer.hush.land/var/www/explorer.hush.land/addresses/template.html

@ -1,78 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<div class="blockt"><p>These addresses have NO PRIVACY! They really should move funds to a zaddr!</p></div>
#ADDRESS_DATA#
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

101
var/www/explorer.hush.land/var/www/explorer.hush.land/block/template.html

@ -1,101 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../../UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<table>
<tr><td style="font-size: 14px"><a href="/block/#BLOCKS#" class="mainlinkexplorer">Block Height: #BLOCKS#</a></td></tr>
<tr><td style="font-size: 14px"><a href="/block/#BLOCKHASH#" class="mainlinkexplorer">Block Hash: #BLOCKHASH#</a></td></tr>
<tr><td style="font-size: 14px"><a href="/block/#PREVIOUSBLOCKHASH#" class="mainlinkexplorer">Previous Block Hash: #PREVIOUSBLOCKHASH#</a></td></tr>
</table>
<table>
<tr>
<td style="font-size: 14px">Block Reward: #BLOCKREWARD#</td>
<td style="font-size: 14px">Block Time: #BLOCKTIME#</td>
<td style="font-size: 14px">Block Difficulty: #DIFFICULTY#</td>
</tr>
<tr>
<td style="font-size: 14px">Block size: #BLOCKSIZE# bytes</td>
<td style="font-size: 14px">Block Version: #VERSION#</td>
<td style="font-size: 14px">Block Bits: #BITS#</td>
</tr>
</table>
<table>
<tr><td style="font-size: 14px">Block Nonce: #BLOCKNONCE#</td></tr>
<tr><td style="font-size: 14px">Block Anchor: #ANCHOR#</td></tr>
<tr><td style="font-size: 14px">Chainwork: #CHAINWORK#</td></tr>
<tr><td style="font-size: 14px">Merkle Root: #MERKLEROOT#</td></tr>
<tr><td style="font-size: 14px">Final Sapling Root: #FINALSAPLINGROOT#</td></tr>
</table>
#TX_TABLE#
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

77
var/www/explorer.hush.land/var/www/explorer.hush.land/blocks/template.html

@ -1,77 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
#BLOCKS_TABLE#
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

125
var/www/explorer.hush.land/var/www/explorer.hush.land/index-1.html

@ -1,125 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlink:link { text-decoration: dotted underline; text-underline-position: under }
.mainlink:hover { text-decoration: none; color: #595959 }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<div class="blockt"><p>This is the most private and secure Blockchain Explorer in Zcash World, inspiration goes to <a href="https://xmrchain.net" class="mainlink">xmrchain.net</a>! There is no Javascript both client or server-side, it has no cookies, web analytics trackers, no images, no external CSS, visited and unvisited links are the same color so screenshots do not leak metadata, likewise it is available as a <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="mainlink">Tor hidden service</a>.</p></div>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Thu Sep 29 17:23:39 2022<!-- 1664472219 --></td>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Blocks list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Block Height: 1099008 </a></td>
<td style="font-size: 14px; width: 50%"><a href="https://git.hush.is/hush/anonsets" class="mainlinkexplorer">Anonymity Set</a>:<span class='anonset'> 2410752 </span></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Total Transactions: 1810407</td>
<td style="font-size: 14px; width: 50%">Transaction Rate: 2.1093 per minute </td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Hashrate: 11.19 MSol/s</td>
<td style="font-size: 14px; width: 50%">Difficulty: 49283696</td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Circulating Supply: 12798895.34523515 HUSH</td>
<td style="font-size: 14px; width: 50%">Shielded Supply: 6850551.72538454 HUSH</td>
</tr>
</table>
<table>
<td style="font-size: 14px; width: 50%">Price:<span class='price'> 0.00000273 BTC</span></td>
<td style="font-size: 14px; width: 50%">Total Volume:<span class='volume'> .0077033708 BTC </span></td>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Percent Shielded: 53.525 </td>
<td style="font-size: 14px; width: 50%"><a href="/addresses/" class="mainlinkexplorer">T-addresses list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">29 peers connected via TLS 1.3</td>
<td style="font-size: 14px; width: 50%">Protocol Version: 1987424</td>
</tr>
</table>
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

125
var/www/explorer.hush.land/var/www/explorer.hush.land/index.html

@ -1,125 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlink:link { text-decoration: dotted underline; text-underline-position: under }
.mainlink:hover { text-decoration: none; color: #595959 }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<div class="blockt"><p>This is the most private and secure Blockchain Explorer in Zcash World, inspiration goes to <a href="https://xmrchain.net" class="mainlink">xmrchain.net</a>! There is no Javascript both client or server-side, it has no cookies, web analytics trackers, no images, no external CSS, visited and unvisited links are the same color so screenshots do not leak metadata, likewise it is available as a <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="mainlink">Tor hidden service</a>.</p></div>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Thu Sep 29 17:23:39 2022<!-- 1664472219 --></td>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Blocks list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Block Height: 1099008 </a></td>
<td style="font-size: 14px; width: 50%"><a href="https://git.hush.is/hush/anonsets" class="mainlinkexplorer">Anonymity Set</a>:<span class='anonset'> 2410752 </span></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Total Transactions: 1810407</td>
<td style="font-size: 14px; width: 50%">Transaction Rate: 2.1093 per minute </td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Hashrate: 11.19 MSol/s</td>
<td style="font-size: 14px; width: 50%">Difficulty: 49283696</td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Circulating Supply: 12798895.34523515 HUSH</td>
<td style="font-size: 14px; width: 50%">Shielded Supply: 6850551.72538454 HUSH</td>
</tr>
</table>
<table>
<td style="font-size: 14px; width: 50%">Price:<span class='price'> 0.00000273 BTC</span></td>
<td style="font-size: 14px; width: 50%">Total Volume:<span class='volume'> .0077033708 BTC </span></td>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Percent Shielded: 53.525 </td>
<td style="font-size: 14px; width: 50%"><a href="/addresses/" class="mainlinkexplorer">T-addresses list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">29 peers connected via TLS 1.3</td>
<td style="font-size: 14px; width: 50%">Protocol Version: 1987424</td>
</tr>
</table>
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

125
var/www/explorer.hush.land/var/www/explorer.hush.land/template.html

@ -1,125 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlink:link { text-decoration: dotted underline; text-underline-position: under }
.mainlink:hover { text-decoration: none; color: #595959 }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<div class="blockt"><p>This is the most private and secure Blockchain Explorer in Zcash World, inspiration goes to <a href="https://xmrchain.net" class="mainlink">xmrchain.net</a>! There is no Javascript both client or server-side, it has no cookies, web analytics trackers, no images, no external CSS, visited and unvisited links are the same color so screenshots do not leak metadata, likewise it is available as a <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="mainlink">Tor hidden service</a>.</p></div>
<table>
<tr>
<td style="font-size: 14px; width: 50%">#TIPTIME#</td>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Blocks list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%"><a href="/blocks/" class="mainlinkexplorer">Block Height: #BLOCKS# </a></td>
<td style="font-size: 14px; width: 50%"><a href="https://git.hush.is/hush/anonsets" class="mainlinkexplorer">Anonymity Set</a>:<span class='anonset'> 2410752 </span></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Total Transactions: #TXCOUNT#</td>
<td style="font-size: 14px; width: 50%">Transaction Rate: #TXRATE# per minute </td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Hashrate: #NETWORKSOLPS# MSol/s</td>
<td style="font-size: 14px; width: 50%">Difficulty: #DIFFICULTY#</td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Circulating Supply: #SUPPLY# HUSH</td>
<td style="font-size: 14px; width: 50%">Shielded Supply: #ZFUNDS# HUSH</td>
</tr>
</table>
<table>
<td style="font-size: 14px; width: 50%">Price:<span class='price'> 0.00000273 BTC</span></td>
<td style="font-size: 14px; width: 50%">Total Volume:<span class='volume'> .0077033708 BTC </span></td>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">Percent Shielded: #ZFUNDS_PERCENT# </td>
<td style="font-size: 14px; width: 50%"><a href="/addresses/" class="mainlinkexplorer">T-addresses list</a></td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 14px; width: 50%">#CONNECTIONS# peers connected via TLS 1.3</td>
<td style="font-size: 14px; width: 50%">Protocol Version: #PROTOCOLVERSION#</td>
</tr>
</table>
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

85
var/www/explorer.hush.land/var/www/explorer.hush.land/tx/template.html

@ -1,85 +0,0 @@
<!doctype html>
<head>
<title>Home | Hush - Transact and Speak Freely</title>
<style>
body { background-color: #101010; max-width: 850px; margin: auto; font-family: 'Ubuntu Mono'; color: #b3b3b3; text-align: center }
table { width: 100%; border-collapse: collapse; margin-top: 15px }
td { border: 1px solid #1a1a1a; font-size: 16px; padding: 0.5em }
td:hover { background-color: #1a1a1a }
pre { background-color: #0d0d0d; border: 1px solid #1a1a1a; font-size: 6px; padding: 15px; color: #e6e6e6 }
details { cursor: pointer; background-color: #0d0d0d; text-align: left; margin-top: 15px; padding: 0.5em; border: 1px solid #1a1a1a; font-size: 13px; word-wrap: break-word }
summary { outline: none; padding: 0.4em }
.blockt { border: 1px solid #1a1a1a; padding: 0.15em; background-color: #0d0d0d; margin-top: 15px; text-align: left; font-size: 13px; word-wrap: break-word }
.blockt p { padding-left: 0.7em; padding-right: 0.7em }
.button:link { float: right; font-size: 11px }
.mainlinkexplorer:link { text-decoration: dotted underline; text-underline-position: under }
.mainlinkexplorer:hover { text-decoration: none; color: #595959 }
.links { margin: 15px; font-size: 13px }
a:link { color: #b3b3b3; text-decoration: none }
a:visited { color: #b3b3b3 }
a:hover { color: #b3b3b3 }
* { scrollbar-width: thin; scrollbar-color: #333333 #101010 }
::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-thumb { background: #333333 }
@font-face { font-family: 'Ubuntu Mono'; src: url('../../UbuntuMono.ttf') format('truetype') }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h2>Hush - Speak and Transact Freely</h2>
<h3>Private Cryptocurrency and Messenger using Zero Knowledge Mathematics</h3>
<pre>
&&&&
&&&& &&&&&& &&&&
&&&&&& &&&&&& &&&&&&
&&& &&&&&& &&&& &&&&&& &&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&& &&&&&
&&&&& &&&& && &&&&&& &&&&&
&&&&& &&&&&& &&&&&
&&&&& &&&& &&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&& &&&&&
&&&&& &&&&&& &&&&&& &&&&&
&&& &&&&&& && && &&&&&& &&&
&&&&&& &&&&&& &&&&&&
&&&& &&&&&& &&&&
&&&&&&
&&&& <a href="http://jlqhwhak65kokg3pdjp3ufy6almf5spnhsfnugtjsc4z7wtapgozxyad.onion" class="button">.onion</a>
</pre>
<table>
<tr>
<td><a href="https://hush.land">Why Hush</a></td>
<td><a href="https://hush.land/hushchat.html">HushChat</a></td>
<td><a href="https://hushpool.is">HushPool</a></td>
<td><a href="https://git.hush.is/onryo/hush-box">HushBox</a></td>
</tr>
<tr>
<td><a href="https://explorer.hush.land">Explorer</a></td>
<td><a href="https://git.hush.is/hush">Gitea</a></td>
<td><a href="https://hush.land/faq.html">F.A.Q</a></td>
<td><a href="https://hush.land/team.html">Team</a></td>
</tr>
</table>
<table>
<tr><td style="font-size: 14px"><a href="/block/#BLOCKHEIGHT#" class="mainlinkexplorer">Block Height: #BLOCKHEIGHT#</a></td></tr>
<tr><td style="font-size: 14px"><a href="/block/#BLOCKHASH#" class="mainlinkexplorer">Block Hash: #BLOCKHASH#</a></td></tr>
<tr><td style="font-size: 14px"><a href="/tx/#TXID#" class="mainlinkexplorer">Transaction ID: #TXID#</a></td></tr>
<tr><td style="font-size: 14px">Transaction Time: #TXTIME#</td></tr>
</table>
<table>
#TX_DATA#
</table>
<div class="links">
<a href="https://hush.is/matrix"><span style="color: #262626">[</span> matrix <span style="color: #262626">]</span></a>
<a href="https://hush.is/mastodon"><span style="color: #262626">[</span> mastodon <span style="color: #262626">]</span></a>
<a href="https://videos.hush.is"><span style="color: #262626">[</span> peertube <span style="color: #262626">]</span></a>
<a href="https://t.me/hush_main"><span style="color: #262626">[</span> telegram <span style="color: #262626">]</span></a>
</div>
</body>
</html>

15
var/www/explorer.hush.land/var/www/explorer.hush.land/update.sh

@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
DOMAIN=explorer.hush.land/var/www/explorer.hush.land
DIR=/var/www
echo $$ >> $DIR/$DOMAIN/PID
# make a backup so we can diff them
cp $DIR/$DOMAIN/{index,index-prev}.html
# let index.html settle
sleep 2
perl /var/www/explorer.hush.land/bin/update.pl /var/www/explorer.hush.land/api &> $DIR/$DOMAIN/index-new.html
cp $DIR/$DOMAIN/index-new.html $DIR/$DOMAIN/index.html
Loading…
Cancel
Save